Advertisement
Kocyk

Untitled

Jan 10th, 2017
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4.  
  5. public class Main {
  6.  
  7. public static void main(String[] args) throws InterruptedException {
  8.  
  9. Scanner scan = new Scanner(System.in);
  10.  
  11. System.out.println("How much you want the counterdown count?");
  12.  
  13. int tim = scan.nextInt();
  14.  
  15. long delay = tim * 1000;
  16.  
  17.  
  18.  
  19. do{
  20.  
  21. Thread.sleep(1000);
  22.  
  23. System.out.println(tim / 1);
  24.  
  25. tim = tim - 1;
  26.  
  27. delay = delay - 1000;
  28.  
  29.  
  30.  
  31. }while (delay != 0);
  32. System.out.println("Time's Up!");
  33.  
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement