Write a program in Java to display the following pattern:
1
2 1
3 2 1
4 3 2 1
5 4 3 2 1
pls ans fast
Answers
Answered by
2
Answer :-
Public Class partten
{
Public static void main (string args[ ])
Scanner in = new scanner (System. in);
{
int I,J;
for (i = 0;i<=5 i++)
{
for (J = 0; J<=i;j++)
System.out.print(chr (J) );
System. out. println ( );
}
}
Similar questions
English,
1 month ago
English,
1 month ago
History,
1 month ago
English,
3 months ago
Political Science,
9 months ago
India Languages,
9 months ago
Science,
9 months ago