Computer Science Canada Unlimited Variables (HELP!) |
Author: | wOOhooo [ 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. |
Author: | Tony [ Mon Feb 25, 2008 9:13 am ] |
Post subject: | RE:Unlimited Variables (HELP!) |
sounds like you need just two variables at any given point. |
Author: | OneOffDriveByPoster [ 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? |
Author: | BigBear [ 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. |