0

How can make the following output pyramid reverse??

https://code.sololearn.com/cw8K6KT6rcfr/?ref=app

17th Aug 2020, 12:57 PM
Gaurav Kamble
Gaurav Kamble - avatar
2 Answers
0
You could eather start with i=r: for (int i=r; i>0; i--) { for(int j=0 ; j<=i; j++) { printf ("*"); } printf ("\n"); } Or you print r-i lines in each row: for (int i=0 ; i<r; i++) { for(int j=0 ; j<=r-i; j++) { printf ("*"); } printf ("\n"); }
17th Aug 2020, 1:00 PM
Alexander Thiem
Alexander Thiem - avatar