Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. class Main {
  4. public static void main(String[] args) {
  5. Scanner inp = new Scanner(System.in);
  6. String in = inp.nextLine();
  7. countdown(Integer.parseInt(in));
  8. }
  9.  
  10. public static void countdown(int n) {
  11. for (int i = n; i >= 0; i--) {
  12. System.out.print(i + " ");
  13. }
  14. }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement