源程序:
#include
#include
int main()
{
int year,month,day,sum;
int d[12]={0,31,59,90,120,151,181,212,243,273,304,334};
printf("Please enter the data:");
scanf("%d,%d,%d",&year,&month,&day);
if((year%4==0&&year%100!=0)||year%400==0)
sum=d[month-1]+day;
else
sum=d[month-1]+day+1;
printf("The days in this year:%d\n",sum);
getch();
}
C语言visual studio运行程序过程中提示.EXE已停止工作
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
