SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
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