max/min of an unknown number of inputs in LMC?
问题 How can I print the maximum/minimum of an unknown number of inputs in LMC? I know that I can SUB INPUT 1 FROM INPUT 2 and see if it is negative or positive but I don't know how to name the inputs so that I can load them. PS: I found this useful link to help me with the ''unknown number of inputs" part How can I store an unknown number of inputs in different addresses in LMC (little-man-computer)? 回答1: You link to code that stores an undetermined number of input values. But in your case that