Please print this pattern. ....i got it wrong | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please print this pattern. ....i got it wrong

1 21 321 4321 54321

9th May 2018, 5:12 AM
ashish
ashish - avatar
5 Answers
+ 5
for (int i=1;i<6;i++) { System.out.print("\n"); for(int v=i;v>0;v--) { System.out.print(v); } }
9th May 2018, 5:47 AM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 1
neither do I
9th May 2018, 5:35 AM
Fery Ardiansyah
Fery Ardiansyah - avatar
0
I don't understand the question you are asking
9th May 2018, 5:33 AM
SoakedInAllan
SoakedInAllan - avatar
0
sorry. ....my mistake
9th May 2018, 5:48 AM
ashish
ashish - avatar
0
int i,j,k; for(i=1,k=1;i<=5;i++,k++ ) { for (j=5;j>=i+1; j--) { System. out.print(""); } for(j=k;j>=1;j--) { System .out. print(j); } System .out.println (""); } } this might help you
9th May 2018, 7:20 AM
Arun Tomar
Arun Tomar - avatar