Sep 20 2004, 07:31 AM
Post
#1
|
|
|
New Member ![]() Group: Members Posts: 3 Joined: 20-September 04 Member No.: 1,751 ![]() |
hi
am a new member here and am a beginner in c++ just wondering if you have ten variables how you can get the two maxs ? Mohd, bye |
|
|
|
![]() |
Sep 20 2004, 10:16 AM
Post
#2
|
|
![]() Boss, my code's compiling (xkcd) Group: Admins Posts: 10,440 Joined: 19-September 01 Member No.: 1 ![]() |
Loop through all the variables (assuming they're stored in an array), checking to see if each one is bigger than the one before it. If it is, replace your 'max' variable with that value.
-------------------- ![]() ![]() Things that I don't suck at: Photography (flickr, JPG Mag), "Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com |
|
|
|
almarkhi two max Sep 20 2004, 07:31 AM
almarkhi thanks ali for your response but i want two max no... Sep 20 2004, 11:49 AM
usr.c In that case, look for the min instead using a sim... Sep 20 2004, 05:13 PM
almarkhi thanks
bubble sort is already in my mind but it... Sep 21 2004, 07:18 AM![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 03:19 PM |