WAP to print the program:
55555
4444
333
22
1
Answers
Answered by
1
Answer:
class number pyramid
{
public static void main(String[] args)
{
for(int r=5;r>=1;r--)
{
for(int c=1;c<=r;c++)
{
System.out.print(r);
}
System.out.println();
}
}
}
Explanation:
Answered by
0
Answer:
using python:
for i in range(5, 0, -1):
for j in range(0, i):
print(i, end="")
print()
Attachments:
Similar questions