Pr0gramer

Numeros del 1-100 usando: While

Jul 31st, 2018
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.21 KB | None | 0 0
  1. package numeros_del_1.pkg100;
  2. public class Numeros_del_1100 {
  3.     public static void main(String[] args) {
  4.     int x=1;
  5.     while (x<=100) {
  6.         System.out.printf("%d-",x);
  7.         x = x+1;
  8.     }
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment