SHARE
TWEET

debug a program

Gauge1417 Jan 22nd, 2020 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top