When I strip those // comments, your code compiles with just a few warnings.
In other words, you're declaring a variable in the middle of a block, and main() takes two parameters that you're not using and main() isn't returning anything. Quite minor.Code:nocompile2.c: In function ‘main’:
nocompile2.c:41: warning: ISO C90 forbids mixed declarations and code
nocompile2.c:60: warning: control reaches end of non-void function
nocompile2.c: At top level:
nocompile2.c:36: warning: unused parameter ‘argc’
nocompile2.c:36: warning: unused parameter ‘argv’
You want me to do the surgery? Okay, fine.
That wasn't hard, was it? ;)Code:int main(int argc, char * argv[])
{
output = stdout;
input = stdin;
int i;
float array[SIZE];
for(i=0; i<SIZE; i++)
{
while(1) {
fprintf(output,"Enter value %i: ",i);
if(scanf("%lf", &array[i]) == 1) break;
while(getchar() != '\n');
}
}
fprintf(output,"\n");
fprintf(output,"Your values you entered are as follows:\n");
display(array);
fprintf(output,"The maximum value entered is:\n");
fprintf(output,"%.4e\n",max(array));
}

