Advertisement
Gauge1417

debug a program

Jan 22nd, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Program {
  4. public static void main(String[] args) {
  5. Scanner sc = new Scanner(System.in);
  6. int seconds;
  7. System.out.println("How many seconds until liftoff?");
  8. seconds = sc.nextInt();
  9.  
  10. while(seconds > 0) {
  11. System.out.println(seconds + "!");
  12. if(seconds == 1);
  13. System.out.println("Blastoff!");
  14. }
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement