Advertisement
cesarnascimento

imprimir de 100 até 1 com for

May 12th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. package ex18;
  2. import java.util.Scanner;
  3. public class ex18 {
  4.  
  5.     public static void main(String[] args) {
  6.         Scanner sc = new Scanner(System.in);
  7.         int n;
  8.            
  9.             for(n = 100; n >= 1; n--){
  10.                 System.out.println(n);
  11.             }
  12.     }
  13.  
  14. }
  15. // imprimir todos numeros de 100 até 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement