大哥大姐,打扰一下,C语言程序运行不了,哪位大神帮忙解个惑呀??
#include <stdio.h>#include <math.h>
void mian()
{
int a[10]={0,1,6,16,23,56,80,100,110,115};
int low,high,mid,found,n;
low=0;
high=9;
found=0;
printf("wirte a number:\n");
do
{
scanf("%d",&n);
getchar();
}while(n<a[0]||n<a[9]);
while(low <= high)
{
mid=(low+high)/2;
if(n==a[mid])
{
found=1;
break;
}
else if(a[mid]>n)
high=mid-1;
else
low=mid+1;
}
if(found==1)
{
printf("this number bit is %d\n",mid);
}
else
{
printf("NO no %d\n",n);
}
}
编译没报错呀,,到运行时候报错了。
报错类型:
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/21102601.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.