We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
delete (Read 242 times)
delete
Feb 2nd, 2009, 11:59pm
 
delete please
Re: Printing numbers
Reply #1 - Feb 3rd, 2009, 1:19am
 
Is that homework? Previous question was fun, this one is a bit boring, so I will just give some advice... Smiley
There are several (well, at least two) ways to do this.
One way is to do two nested loops. One counting tens, the inner one counting from 0 to 9. A simple multiplication and addition will give the number for each iteration.
You need a String variable, init to empty string. You will concatenate a space after ending the inner loop, and print it before it. Using print to display on the same line, don't forget the space between the numbers. Use println at the end of the inner loop, to go to new line.
Page Index Toggle Pages: 1