0
How can make the following output pyramid reverse??
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");
}