#include<stdio.h>
#include<string.h>
struct INFO
{
int year;
int mon;
int day;
int num;
};
int main()
{
struct INFO A;
int i,t=0;
int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int b[12]={31,29,31,30,31,30,31,31,30,31,30,31};
scanf("%d %d %d",&A.year,&A.mon,&A.day);
if(A.year%4==0&&A.year%100!=0||A.year%400==0)
{ for(i=0;i<A.mon-1;i++)
t+=b[i];
A.num=t+A.day;}
else
{ for(i=0;i<A.mon-1;i++)
t+=a[i];
A.num=t+A.day;}
printf("%d\n",A.num);
return 0;
}
0.0分
0 人评分
C语言训练-求函数值 (C语言代码)浏览:935 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:1038 |
简单编码 (C++代码)浏览:705 |
2005年春浙江省计算机等级考试二级C 编程题(3) (C语言代码)浏览:406 |
C语言训练-求函数值 (C语言代码)浏览:591 |
简单的a+b (C语言代码)浏览:619 |
【绝对值排序】 (C语言代码)浏览:885 |
最小公倍数 (C语言代码)浏览:1060 |
1012题解浏览:910 |
钟神赛车 (C语言代码)浏览:632 |