Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Unlimited Variables (HELP!)
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wOOhooo




PostPosted: Mon Feb 25, 2008 8:54 am   Post subject: Unlimited Variables (HELP!)

Ok heres the problem i have. In class we need to create a program that will tell you what the greater number is and you have to be able to put as many numbers in as you want. I have no idea how to make a varaiable have multiple numbers in it.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Feb 25, 2008 9:13 am   Post subject: RE:Unlimited Variables (HELP!)

sounds like you need just two variables at any given point.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
OneOffDriveByPoster




PostPosted: Mon Feb 25, 2008 9:36 am   Post subject: Re: Unlimited Variables (HELP!)

wOOhooo @ Mon Feb 25, 2008 8:54 am wrote:
Ok heres the problem i have. In class we need to create a program that will tell you what the greater number is and you have to be able to put as many numbers in as you want. I have no idea how to make a varaiable have multiple numbers in it.
Any sample input/output?
BigBear




PostPosted: Mon Feb 25, 2008 3:11 pm   Post subject: Re: Unlimited Variables (HELP!)

This is something you need to think about it is a very useful programming technique. One way you go do it is in the beginning ask them how many numbers they want to enter and make a for loop to get and compare the numbers. YOu can also ask the user every time if they would like to enter another number.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: