okay, i got the box to close, but what is wrong with my code where i can't loop the middle part n-2 times? i cant seem to find out whats wrong. thank you
Code:
#include <stdio.h>
int
main(void)
{
int i, j; /* loop control variables */
printf("type number of rows\n"); /* prints column labels */
scanf("%d", &j);
for (i = 0; i < j; i++)
printf ("*");
printf("\n");
for (i = 0; i < j - 2; i++)
{
printf("*");
for (i = 0; i < j - 2; i++)
printf(" ");
printf("*\n");
}
for (i = 0; i < j; i++)
printf ("*");
printf("\n");
return (0);
}