Guest User

Untitled

a guest
Jan 12th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. public class Galg
  2. {
  3.     public static void print(int stage)
  4.     {
  5.         String line6 = "", line5 = "|", line4 = "| ", line3 = "| ", line2 = "| ";
  6.        
  7.         if(stage > 1)
  8.             line5 += "/";
  9.         if(stage > 2)
  10.             line5 += " |";
  11.        
  12.         if(stage > 3)
  13.             line4 += " O ";
  14.        
  15.         if(stage == 5)
  16.             line3 += " |";
  17.         if(stage > 5)
  18.             line3 += "/|";
  19.         if(stage > 6)
  20.             line3 += "\\";
  21.        
  22.         if(stage > 0)
  23.             line6 = "____";
  24.        
  25.         if(stage > 7)
  26.             line2 += "/";
  27.         if(stage > 8)
  28.         {
  29.             line2 += "\\";
  30.         }
  31.        
  32.         System.out.println(line6 + "\n" + line5 + "\n" + line4 + "\n" + line3 + "\n" + line2 + "\n|_ _");
  33.     }
  34. }
Add Comment
Please, Sign In to add comment