Computer Science Canada Adding numbers binded as one interger |
Author: | chrispaks [ Mon Apr 18, 2005 3:08 pm ] |
Post subject: | Adding numbers binded as one interger |
For example: if you entered 12345 into the get command area, the program will put "it is 5 numbers long and their sum is 15" I know how to use the length command, but what command would I use to convert it into? Would I use a strint or intstr command? strintok? how would i seperate it so I can add the numbers? |
Author: | Martin [ Mon Apr 18, 2005 3:11 pm ] | ||
Post subject: | |||
|
Author: | chrispaks [ Mon Apr 18, 2005 3:15 pm ] |
Post subject: | |
Thanks Now I'd just use the "put sum" to display it? and the i is used as a variable to help add them together right? |
Author: | Martin [ Mon Apr 18, 2005 3:18 pm ] |
Post subject: | |
Are you familiar with for loops? i is simply a counter. |
Author: | chrispaks [ Mon Apr 18, 2005 4:42 pm ] |
Post subject: | |
no im just familiar with 'loops' in general ill go read a guide and learn it, I dont even know much GUI im a noob at this stuff |
Author: | Martin [ Mon Apr 18, 2005 4:55 pm ] | ||||
Post subject: | |||||
A for loop is a counted loop.
is the equivalent of
|