Log in

View Full Version : Java program?


nofear13
Feb 21, 2009, 06:05 AM
we have an assignment!
but hold up!
I would only ask what is the name of this code if I have fill up the blanks!
code:
puclic class problim{
public static void main(String[]arg){
int x=___;
int y=___;
while;(__<s){
x=____;
y=____;
system.out.print(_+_+_+_);
x=_+_;
}
}
}

is it a while loop or do while? Or if-else? What ? If I had fill it up?. :confused:
thanks for your time...

Perito
Feb 21, 2009, 06:18 AM
while;(__<s){
x=____;
y=____;
system.out.print(_+_+_+_);
x=_+_;
}

is it a while loop or do while? or if-else? what ? if i had fill it up?...:confused:
thanks for your time...

That is a "while loop". The condition is evaluated at the beginning of each loop.

Is there really a ";" after the "while"? There shouldn't be.

Fowl05
Apr 20, 2010, 01:50 PM
Perito is correct, also a do... while loop would have a do.