|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
编译没错,运行时提示出错
#include<stdio.h>
#include<math.h>
void main()
{
int a,b,c,d,e;
print ("请输入某年某月某日");
scanf("%d,%d,%d",&a,&b,&c);
if ((a%4==0)&&(a%100!=0))
{d=29;}
if ((a%100==0)&&(a%400!=0))
{d=28;}
if (a%400==0)
{d=28;}
if (a%4!=0)
{ d=28;}
e=0;
switch(b-1)
{
case 12:e=e+31;
case 11:e=e+30;
case 10:e=e+31;
case 9:e=e+30;
case 8:e=e+31;
case 7:e=e+31;
case 6:e=e+30;
case 5:e=e+31;
case 4:e=e+30;
case 3:e=e+31;
case 2:e=e+d;
case 1:e=e+31;
}
e=e+c;
printf("%d",e);
}
// *--------------------Configuration: hh - Win32 Debug--------------------
Linking...
hf.obj : error LNK2005: _main already defined in a.obj
a.obj : error LNK2001: unresolved external symbol _print
hf.obj : error LNK2001: unresolved external symbol _print
Debug/hh.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
hh.exe - 1 error(s), 0 warning(s)
*// |
|