Write a program of the following
55555
4444
333
22
1 And
1234
123
12
1
Answers
Answered by
0
Answer:
class Pattern
{
public void pattern1()
{
for(int i=5;i>=1;i--)
{
for(int j=1;j<=i;j++)
{
System.out.print(i);
}
System.out.println(" ");
}
}
public void Pattern2()
{
for(int i=4;i>=1;i--)
{
for(int j=1;j<=i;j++)
{
System.out.print(j);
}
System.out.println(" ");
}
}
}
Similar questions
Math,
5 months ago
Science,
5 months ago
Physics,
5 months ago
Economy,
11 months ago
Social Sciences,
1 year ago