+ 1

have a problem in coding

i want to print this output using" jagged array." * * * * * * * * * * as far as.. i can print in using jagged Array.. In two way... i attached code.. every one get idea https://code.sololearn.com/cc8SjQeaVFBS/?ref=app

5th Apr 2018, 9:51 AM
Arun Tomar
Arun Tomar - avatar
8 odpowiedzi
+ 2
for(int i=0;i<a.length;i++) { for(int j=0;j<i;j++) System.out.print(" "); for(int j=i;j<a[i].length;j++) { System.out.print("*"); } System.out.println(); } Edited from your code.
5th Apr 2018, 10:39 AM
Bartosz Pieszko
Bartosz Pieszko - avatar
+ 1
char c[4][4]; for (int i=0; i<4; i++) { for (int j=0; j<i; j++) print ' ' for (int j=i; j<4; j++) print '*' print \n }
5th Apr 2018, 9:57 AM
Bartosz Pieszko
Bartosz Pieszko - avatar
+ 1
pls see the code... I wants to print this way.and sorry for attached code late
5th Apr 2018, 10:24 AM
Arun Tomar
Arun Tomar - avatar
+ 1
Check edited code here.
5th Apr 2018, 10:28 AM
Bartosz Pieszko
Bartosz Pieszko - avatar
+ 1
not working so many error come
5th Apr 2018, 10:36 AM
Arun Tomar
Arun Tomar - avatar
+ 1
Change print lines for correct lines man. I wrote it fast on phone.
5th Apr 2018, 10:37 AM
Bartosz Pieszko
Bartosz Pieszko - avatar
+ 1
i do bro
5th Apr 2018, 10:38 AM
Arun Tomar
Arun Tomar - avatar
+ 1
Thanks for the help
5th Apr 2018, 10:47 AM
Arun Tomar
Arun Tomar - avatar