Advertisement
keltuz

back_triangle.java

Jan 9th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.47 KB | None | 0 0
  1. public class back_triangle{
  2.  
  3.      public static void main(String []args){
  4.         int size=11;
  5.         for (int i=0; i<size; i++){ //высота
  6.             for (int j=0; j<size; j++){
  7.                 if (j==size || i==size-j-1 || i==size-1 || j==size-1){
  8.                     System.out.print("O");
  9.                 }
  10.                 else{
  11.                     System.out.print(" ");
  12.                 }
  13.             }
  14.             System.out.println();
  15.         }
  16.      }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement