Advertisement
cesarnascimento

1 a 10 do while

May 9th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 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.         do{
  11.            
  12.             System.out.println(numeros++);
  13.        
  14.         }while(numeros <=10);
  15.  
  16.     }
  17.  
  18. }
  19. // imprimir de 1 atΓ© 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement