hi
i need to make a program that uses a "while loop" to find the smallest of user defined integers
can anyone give me a hint?
hi
i need to make a program that uses a "while loop" to find the smallest of user defined integers
can anyone give me a hint?
What you mean by "smallest of user defined integers"? As in you have say, an array of integers from user input, and you want to find the minimum element in this array?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
declare a variable min and initialize with first int
compare min with every int. if an int is less than min, then assign min to that int
when you have finished all the int, min should be the minimum
the values can be stored in an array and use a while loop with an index
thank u