Getting close but I think I am stuck on the second loop. The input you put in will be doubled (and it's not supposed to). Any help much appreciated!!
Code:
int main()
{
int n, i, j, k;
printf("What would you like the height to be? (Positive odd integer)\n");
scanf("%d", &n);
for(i=1; i <= n; i++)
{
for(j=1; j <= n-i; j++)
printf("%c", ' ');
for (k=1; k <= 2*i-1; k++)
printf("%c", '*');
printf("\n");
}
k = 1;
for(i=1; i <= n - 1; i++)
{
for(j=1; j <= k; j++)
printf(" ");
k++;
for (j=1; j <= 2*(n-i)-1; j++)
printf("*");
printf("\n");
}
return 0;
}