Computer Science Canada Loop help |
Author: | KONjbnj [ Tue Apr 12, 2005 8:11 am ] |
Post subject: | Loop help |
hello, i have a problem how do u make it so that when you loop 2 variables they do not have the same value ie. a program which will ask the user to enter two integer numbers. You want to swap the numbers so that larger of the two numbers is stored in the variable, Large, and the smaller of the two is stored in the variable, Small. and then loop so it asks the user to eneter 2 more. whenever i do this it keeps the value of the numbers which i used the second time can anyone help??/ |
Author: | Token [ Tue Apr 12, 2005 8:24 am ] | ||
Post subject: | |||
here ya go, what it does is checks to see if its larger then the largest variable, look at it to see qwhat i mean
|
Author: | Martin [ Tue Apr 12, 2005 8:24 am ] |
Post subject: | |
KONjbnj, I don't have a clue what you're talking about. |
Author: | StarGateSG-1 [ Tue Apr 12, 2005 11:06 am ] | ||
Post subject: | |||
I think I understand it after reading for 15 minutes, but this seems like a school question, so I won't give you the code. but the idea you want is to have a tempvar
|