CyberiaPC.com Community Forums Main Page
RSS Feeds: Late(st) News | Zenith Picture Gallery | Most Recent Community Topics | Tips, Tricks and Other Useful Stuff

Welcome Guest ( Log In | Register )

> two max, c++
almarkhi
post Sep 20 2004, 07:31 AM
Post #1


New Member
*

Group: Members
Posts: 3
Joined: 20-September 04
Member No.: 1,751

Bahrain




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
Go to the top of the page
 
+Quote Post
Start new topic
Replies
usr.c
post Sep 20 2004, 10:16 AM
Post #2


Boss, my code's compiling (xkcd)
Group Icon

Group: Admins
Posts: 10,440
Joined: 19-September 01
Member No.: 1

Nothing Selected




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), Skydiving, Splitting atoms, Flying a space shuttle
"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
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th May 2013 - 03:19 PM