Advertisement
zero50x

Пример из книги магнитики

Mar 7th, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. class Shuffel
  2. {
  3.     public static void main (String [] args){
  4.  
  5.         int x = 3;
  6.  
  7.         while (x>0) {
  8.  
  9.             if (x > 2){
  10.             System.out.println("a");
  11.             }
  12.  
  13.             x = x - 1;
  14.             System.out.println("-");
  15.  
  16.             if (x == 2){
  17.             System.out.println("b c");
  18.             }
  19.  
  20.             x = x - 1;
  21.             System.out.println("-");
  22.  
  23.             if (x == 1){
  24.             System.out.println("d");
  25.             x = x-1;
  26.             }
  27.  
  28.         }
  29.  
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement