12345
1234
123
12
1
write a java program to display the given pattern (using loop)
Answers
Answered by
2
class pattern
{
public static void main(String arg[])
{
for(int i=5;i>=1;i--)
{
for(int j=1;j<=i;j++)
{
System.out.print(j);
}
System.out.println();
}
}
}
Similar questions