Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class Main {
- public static void main(String[] args) {
- Scanner inp = new Scanner(System.in);
- String in = inp.nextLine();
- countdown(Integer.parseInt(in));
- }
- public static void countdown(int n) {
- for (int i = n; i >= 0; i--) {
- System.out.print(i + " ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement