Hello,
Can anyone help me fix this program?
That's all i can do.
Code:
#include<stdio.h>
#define ROW 9
#define COL 11
int main(void)
{
int i, j;
for(i=1; i<=ROW; i++)
{
for(j=1; j<i+1; j++)
printf("*");
printf("\n");
}
for(i=0; i<COL; i++)
printf("*");
printf("\n");
for(i=1; i<=ROW; i++)
{
for(j=0; j<ROW-i; j++)
printf("*");
printf("\n");
}
return 0;
}
OUTPUT
------
*
**
***
****
*****
******
*******
********
*********
***********
********
*******
******
*****
****
***
**
*
Press any key to continue
/***********************************************/
My CORRECT OUTPUT should look like this
"-"=spaces
-----*
----***
---*****
--*******
***********
--*******
---*****
----***
-----*
[edit]Code tags added by Hammer. Please use them next time.