Advertisement
veronikaaa86

02. Numbers N...1

Mar 27th, 2021
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. package forLoops;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P02NumbersNTo1 {
  6. public static void main(String[] args) {
  7.  
  8. Scanner scanner = new Scanner(System.in);
  9.  
  10. int n = Integer.parseInt(scanner.nextLine());
  11.  
  12. for (int i = n; i >= 1; i--) {
  13. System.out.println(i);
  14. }
  15. }
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement