1234

Solution-20

public class Solution19 {

public static void main(String[] args) {
for(int i=5;i>=1;i--)
{
for(int j=5;j>=i;j--)
{
  System.out.print(" ");
}
for(int k=1;k<=i;k++)
{
System.out.print(i);
}

System.out.println("");
}

}

}

No comments:

Post a Comment