hi all,
I'm new to site {nice work on the forum ;) } and to c++ in general. I've started a class in the subject not to long ago and have hit a snag on one of the programing projects i was asigned to do ... I just cant figure this out ...
basicly i'm buildin a code that'll allow me to take some numbers that a user will enter and spit out the smallest, largest and average of the group. this has to be done using the push_back function that'll insert into vector objects.
Now i've figured out how to calculate average, and how to write the codin for the user to enter the numbers, I just haven't got a clue how i can make the code display the smallest and largest numbers of what the user enters ... i mean how can i make c++ determin which of em is smallest and which is largest ???.
the numbers can be anythin from negative to positve ...
if someone can help me out or point me in a direction of some info for this it be much appreciated ...