PDA

View Full Version : number entries


sel
04-11-2012, 01:31 AM
Hi everyone
how do we get to count how many numbers we enter?
so it can print the numbers we entered?
thank you:confused:

TauTrumpsPi
04-11-2012, 09:42 AM
I'm not 100% sure what you mean, but every time you enter a number you could increase the value of some variable, then when printing the numbers put that variable as the value into a while loop

sel
04-12-2012, 03:07 AM
Hi everyone
how do we get to count how many numbers we enter?
so it can print the numbers we entered?
thank you:confused:


for example.......if i enter in keyboard 1.2.3.4.5.6.......

the print line to be ..
Number Entered is 6.

TauTrumpsPi
04-12-2012, 07:43 AM
So something like this:


print "Enter -1 to stop entering numbers."
while(p != -1)
{
p set value to Ask user for a number
numOfNums = numOfNums + 1
}

print the number of numbers entered was:
print numOfNums as string

Dennis7
05-30-2012, 01:18 AM
what numbers are you talking about?






minecraft server list (http://minecraftserversx.com/)