Advertisement
alicemiriel

Untitled

Mar 31st, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1.  
  2. import java.util.Scanner;
  3.  
  4. public class FirstSample {
  5.  
  6.     public static void main(String[] args) {
  7.  
  8.             int x = 0;
  9.             int y = 0;
  10.             while ( x < 5 ) {
  11.                 System.out.print(x + "" + y + " ");
  12.                 x = x + 1;
  13.  
  14.             if ( y < 5 ) {
  15.                 x = x + 1;
  16.                 if ( y < 3 ) {
  17.                     x = x - 1;
  18.                 }
  19.             }
  20.             y = y + 2;
  21.  
  22.  
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement