Lets go through Ericool's code.
Line 6 and 7 are self explanatory, they store the minimum number and the maximum number.
Line 9 declares the variable nTime which stores how many different numbers you want.
Line 11 and 12 gets user input and puts it into nTime.
I'm assuming the while loop at Line 14 loops until nTime is equal to 0, but it would be clearer to do :
1 2 3 4
|
while (nTime != 0) {
nTime--;
//Rest of loop
}
|
Line 18 creates a temporary variable temp which then on Line 19 gets user input for the current integer.
Line 21 and 22 then check if the temp variable is bigger or smaller than the current minimum and maximum numbers. If the temp is smaller than the minimum number, the new minimum is set to 'temp'. The same goes for the maximum number except it checks if 'temp' is bigger.
Finally when nTime equals 0, it exits the loop, printing out the numbers.
P.S. I'm a new programmer too, so anything i've said may or may not have been completely correct.