Advertisement
Arnab_Manna

ass_patt2.java

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