JAVA PROGRAM
NESTED LOOP
1
21
321
4321
54321
Answers
Answered by
3
class pat2CPQ
{
public static void main(String args[])
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=i;j>=1;j--)
{
System.out.print(j);
}
System.out.println( );
}
}
}
if you find it useful than mark it as brainist and follow me please
Anonymous:
please mark my answer as brainist and follow me please
Answered by
30
Here is your answer.
class x
{
static void main()
{
for(int i=1;i<=5;i++)
{
for(int j=i;j>=1;j--)
System.out.print(j);
System.out.println();
}
}
Similar questions