Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) throws InterruptedException {
- Scanner scan = new Scanner(System.in);
- System.out.println("How much you want the counterdown count?");
- int tim = scan.nextInt();
- long delay = tim * 1000;
- do{
- Thread.sleep(1000);
- System.out.println(tim / 1);
- tim = tim - 1;
- delay = delay - 1000;
- }while (delay != 0);
- System.out.println("Time's Up!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement