Hi everyone,
This is my first post so dont expect anything fantastic. Anyway, As part of my university degree I have to do a short programming course based around C. Now, I'm doing an assignment and because I havnt been programming for years I simply cannot figure out 3 syntax errors due to inexperience. My assignment is finished in every other aspect but I need the syntax errors sorted other wise I can only get 30%(!) for the whole thing. Please help me finish this off

These are the errors:

Data_Massage.c:147: error: syntax error before "fscanf"
Data_Massage.c:149: error: incompatible type for argument 1 of "feof"
Data_Massage.c:203: error: incompatible types in assignment

And this is my code, I've hightlighted the error points

Code:
#include <stdio.h>
#include <string.h>

int main(int argc, char **argv)
{
FILE * output = stdout;
FILE * input = stdin;

int i;
int j;
int data[i];
double maximum;
double minimum;
double average;
double value;
int endvalue;
int counter;
double gtvalue;
double valuedata[counter];
int feof(FILE *stream);
//detecting the number of Command Line Arguments
{
        if (argc<2)
printf("There are not enough command line arguments. Please restart the program and include more than 1 command line argument. If you are unsure of what command line arguments are avalible, type '-help' after the 'a.out' statement");
        return 1;
}
//Searching the 'help' command line argument
for (i=0;i<argc;i++)
        {
        i=0;
        if (strcmp(argv[i],"-help")==0);
                printf("blah");
                return 1;
        }
{
endvalue = -1;
counter = 0;
while (endvalue != counter) do
        fprintf(output,"%c","Please input next value");
        fscanf(input,"%d\n" , value);

        if (feof(value) != 0)
        {
        endvalue = counter;
        }
        else
        {
        valuedata[counter]=value;
        counter=counter+1;
        }
}
for (i=0;i<argc;i++)
        {
        if (strcmp(argv[i],"-max")==0)
                {
                i=0;
                maximum=-999999999;
                for (i=0;i<endvalue;i++)
                        if (data[i]>maximum)
                                maximum=data[i];
                }
        if (strcmp(argv[i],"-min")==0)
                {
                i=0;
                minimum=999999999;
                if (data[i]<minimum);
                                minimum=data[i];
                }
        if (strcmp(argv[i],"-average")==0)
                {
                i=0;
                average=0;
                {
                for (i=0;i<endvalue;i++)
                        average=average+data[i];
                }
                average=average/endvalue;
                }
        if (strcmp(argv[i],"-gta")==0)
                {
                {
                i=0;
                average=0;
                {
                for (i=0;i<endvalue;i++)
                        average=average+data[i];
                }
                average=average/endvalue;
                i=0;
                j=0;
                for (i=0;i<endvalue;i++)
                        if (data[i]>average)
                                j=j+1;
                }
        if (strcmp(argv[i],"-gt")==0)
                {
                value=argv[i];
                i=0;
                j=0;
                for (i=0;i<endvalue;i++)
                        if (data[i]>gtvalue)
                                j=j+1;
                }
        }
}
I've formatted it to what was suggested(I think) and to the specifications of the course outline (hence the large amount of indents).

Please help, all my tutors are on holiday and the course director has made it blatently obvious that he wont help us.

Thanks in advance for your time
Alex