Computer Science, asked by vasanthij97, 1 year ago

JAVA PROGRAM

NESTED LOOP

1
21
321
4321
54321

Answers

Answered by Anonymous
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
vasanthij97: ok, i will mark you as brainliest
Anonymous: please do it fast
Answered by anindyaadhikari13
30

Here is your answer.

&lt;hr/&gt;

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();

}

}

&lt;hr/&gt;

Similar questions