I'm getting the following error in my code and can't figure out why:
assign4.c: In function `int main()':
assign4.c:18: error: parse error before `{' token
assign4.c:50: error: parse error before `}' token
Code:#include <stdio.h>
#include <stdlib.h>
int size;
int seed;
int row;
int col;
int cnum;
int rnum;
int space;
int x;
int y;
int main()
{
int loop()
{
printf("Enter size and seed: ");
int n = scanf("%i $i", &size, &seed);
if(n == 2)
{
for(row = 1; row == size; row++)
{
printf("%i ", seed);
for(col = 1; col == size; col++)
{
cnum = seed;
if((x = cnum + col) <= 9)
{
printf("%i ", x);
}
else
{
y = x - 10;
printf("%i ", y);
}
}
printf("\n");
for(space = row; space == 0; space--)
{
printf(" ");
}
}
}
else
{
printf("Size and seed must both be between 1 and 9.");
loop()
}
}
return EXIT_SUCCESS;
}