Advertisement
chiplu

Java triangle

Nov 17th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. package dadaproject.company;
  2. import java.util.Scanner;
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         for (int i=0;i<5;i++)
  7.         {
  8.             for(int j=0;j<=i;j++)
  9.             {
  10.                 System.out.print("*");
  11.                 System.out.print(" ");
  12.             }
  13.             System.out.print("\n");
  14.         }
  15.  
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement