C语言 显示expected declaration or statement at the end of input怎么该?

#include
#include
#define ST_NUM 1//学生数
typedef struct
{
char num[10]; //学号
char name[9]; //姓名
char sex[3]; //性别
float match; //数学
float english;
float c_language;
float physical;
float modern_history;
float introduction_to_computer_science;
float sum;
float average;
}student;
student ST[ST_NUM];

void main()
{

int i,j;
printf ("请输入%d个学生的信息:\n",ST_NUM);
for (i=0;i<ST_NUM;i++)
{
    printf ("学号:");
    scanf ("%s",ST[i].num);
    printf("姓名:");
    scanf ("%s",ST[i].name);
    printf("性别:");
    scanf("%s",ST[i].sex);
    printf("科目数学的成绩:");
     scanf("%f",&ST[i].match);
    printf("科目英语的成绩:");
     scanf("%f",&ST[i].english);
    printf("科目c语言的成绩:");
     scanf("%f",&ST[i].c_language);
    printf("科目体育的成绩:");
     scanf("%f",&ST[i].physical);
    printf("科目近代史的成绩:");
     scanf("%f",&ST[i].modern_history);
    printf("科目计算机的成绩:");
     scanf("%f",&ST[i].introduction_to_computer_science);

}
    for(i=0;i<ST_NUM;i++)
{
        ST[i].sum=ST[i].match+ST[i].english+ST[i].c_language+ST[i].physical+ST[i].modern_history+ST[i].introduction_to_computer_science;

ST[i].average=ST[i].sum/6;
}

   student tstu; 
  for(i=0;i<ST_NUM;i++)
    {
         for(j=ST_NUM-1;j>i;j--)
         {
              if(ST[j].sum>ST[j-1].sum)
              {
                    tstu=ST[j]; ST[j]=ST[i]; ST[i]=tstu;
              }
         }
    }

printf("学号\t姓名\t性别\t");
printf("数学\t英语\tc语言\t体育\t近代史\t计算机\t总分\t平均分\n");
for (i=0;i<ST_NUM;i++)
{
    printf("%s\t%s\t%s\t",ST[i].num,ST[i].name,ST[i].sex);
    printf("%3.2f\t",ST[i].match);
    printf("%3.2f\t",ST[i].english);
    printf("%3.2f\t",ST[i].c_language);
    printf("%3.2f\t",ST[i].physical);
    printf("%3.2f\t",ST[i].modern_history);
    printf("%3.2f\t",ST[i].introduction_to_computer_science);
    printf("%3.2f\t%3.2f\n",ST[i].sum,ST[i].average);
}

可能是有一个函数或者变量没有在使用之前声明, 还有可能是少了个括号

你上面的程序结尾少了一个大括号,是可以正常运行的

??入1个学生的信息:
学号:1
姓名:marry
性?:1
科目数学的成?:80
科目英?的成?:90
科目c?言的成?:80
科目体育的成?:90
科目近代史的成?:60
科目?算机的成?:70
学号 姓名 性? 数学 英? c?言 体育 近代史 ?算机 ?分 平均分
1 marry 1 80.00 90.00 80.00 90.00 60.00 70.00 470.00 78.33

这时我的运行结果,请忽略乱码,我VS版本的问题

图片说明我用dev(新手专用)编译运行没问题但vs运行不了