Hi, I have a homework assignment that is giving me some problems. I need to make a pyramid of * with a spaces and n rows long. It should look something like this:
____*
___* *
__* * *
_* * * *
* * * * *
I have most of it but my compiler is still coming up with errors. Please help.
# include <stdio.h>
#include <stdlib.h>
int main (void)
{
int n;
for (int i=0; i<n; i++);
{
for (int j=0; j<n-1-i; j++);
printf (" ");
}
{
for (int k=0; k<(2*(i+1));k++)
printf ("* ");
}
printf ("\n");
system ("PAUSE");
return 0;
}