Advertisement
cesarnascimento

while de 1 a 10

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