|
Until you sign up you can't do much. Yes, it's free.
|
|
|
|
|
|
|
 | / / / Viewing Topic
|  |
|
|
yet again my math skills gets in the way of my java work |
|
|
|
Replies: 5 Last Post Nov. 10 7:18am by King Kong
|
|
|
|
|
( King Kong )
Ghostbuster
Patron
|
got to generate a while loop for this, up to 10. 1, -2, 3, -4, 5, i think it has something to do with int1 = 1 int2= -2 while (int2 < 10) {int1= int1 + 2 int2 = int2 + 2} but not sure or should it be int1 = 1 int2= -2 while (int2 < 10) {int1= int1 + 2 int2 = int2 - 2} Post edited at 6:47 am on Nov. 6, 2009 by King Kong
------- Pandora didn't think outside the box
|
|
|
|
|
 LiveWire Humor
|
|
|
|
|
|
allsmiles
Enlightened One
Patron
|
It is a while loop...
------- When they leave me, they're all smiles. When they leave you, they're in tears.
|
|
|
sakurag
Soothsayer
Patron
|
This could also be done with a boolean. However, the solution also provided doesn't need extra variables.
------- I've got spurs that jingle jangle jingle. As I go riding merrily along. And they sing, "Oh, ain't you glad you're single?" And that song ain't so very far from wrong.
|
7:16 am on Nov. 10, 2009 | Joined: Oct. 2002 | Days Active: 862 Join to learn more about sakurag Washington, United States | Straight Male | Posts: 2,815 | Points: 12,272
|
|
| |
|
|
|
|
|
| Looking for something else?
|
|
|
|
|
|
 | / / / Viewing Topic |  |
|