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 ...

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'd bet your prof will want to write your own function to do that.

I'd bet your prof will want to write your own function to do that.

well yes ofcourse ;) ... and i'm planin on doin that but i just needed a point in the right direction as to how ... been that i never seen it done i needed a refrence to build my own ...
I wouldnt just copy somones work cause thats not me ...
thats one of the reasons y i didnt post up the code cause i didnt need someone to solve this for me i just needed a boost in where to look into ...

anyways thx for the info help it def. was alot more then i expected :mrgreen: ...

Comments
Good attitude

I wouldnt just copy somones work cause thats not me ...
thats one of the reasons y i didnt post up the code cause i didnt need someone to solve this for me i just needed a boost in where to look into ...

anyways thx for the info help it def. was alot more then i expected :mrgreen: ...

You've got the correct attitude. :cheesy:

This article has been dead for over six months. Start a new discussion instead.