class Pattern1-5-1
{
public static void main(String args[])
{
for (int i = 5; i>=1;i--)
{
for(int j = 1; j<=i;j++)
{
System.out.print(j);
}
System.out.print("\n");
}
}
}
{
public static void main(String args[])
{
for (int i = 5; i>=1;i--)
{
for(int j = 1; j<=i;j++)
{
System.out.print(j);
}
System.out.print("\n");
}
}
}
No comments:
Post a Comment