注册 登录
编程论坛 新人交流区

在编译中显示“不能到达的代码在函数:(main)"错误

darkangel198 发布于 2007-10-20 20:34, 350 次点击
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include "stdio.h"
#include "graphics.h"
#include "math.h"
main()
{
int year,month;
printf("请输入你要查询的年份_月份\n");
scanf("%d%d",&year,&month);
if(year%400==0||(year%4==0&&year%100!=0))
return(1);
else
return(0);
switch(month){
case 11:
case 9 :
case 6 :
case 4 :
return(30);
case 2:
return(1 ? 29:28);
default:
return(31);
}
}
0 回复
1