求求大神告诉我哪儿错误了。
#include<stdio.h>
#define N 10
void S(int score[])
{ int total,max,min,i,j;double ping;
for( i=0;i<10;i++)
{
total+=score[i];
if(max<score[i]) max=score[i];
if(min>score[i]) min=score[i];
}ping=total/10;
printf("最高分:%d\n",total);
printf("平均分:%.2f\n",ping);
printf("最高分:%d\n",max);
printf("最低分:%d\n",min);
printf("成绩降序排列:\n");
for(i=9;i>=0;i--)
for(j=0;j<i;j++)
{
if(score[j]<score[j+1])
{
score[j]=score[j]+score[j+1];
score[j+1]=score[j]-score[j+1];
score[j]=score[j]-score[j+1];
}
}for(i=0;i<10;i++)
if(i==9)
printf("%3d",score[i]);
else printf("%3d,",score[i]);
}
void mian()
{
int A[N]={1,2,3,4,5,6,7,8,9,10};
S(A);getchar();
}
错误码:
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
Cpp1.exe - 1 error(s), 0 warning(s)