I'm trying to write a program that does a countdown to liftoff, but using a while loop, instead of an for loop.
So far, all I succeed in doing is creating an infinite loop, even though I'm using the same basic principles as the for loop code.
import acm.program.*;
public class CountDownWhile extends ConsoleProgram {
public void run() {
int t = START;
while (t >= 0); {
println(t);
t = t--;
}
println("Liftoff!");
}
private static final int START = 10;
}