#include<stdio.h>
struct Year
{
int year;
int month;
int day;
};
int main()
{
struct Year a;
int year,month,day;
int b[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int i,j=0;
scanf("%d %d %d",&year,&month,&day);
a.year=year;
a.month=month;
a.day=day;
for(i=0;i<a.month;i++)
{
j=j+b[i];
}
if( a.year%400==0 && a.year%100!=0 || a.year%4==0)
{
j++;
printf("%d\n",j);
}
else
{
printf("%d\n",j);
}
return 0;
}
0.0分
1 人评分
这可能是一个假的冒泡法浏览:1045 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:773 |
2003年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:621 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:478 |
WU-C语言程序设计教程(第三版)课后习题11.11 (C++代码)(想学链表的可以看看)浏览:1402 |
三角形 (C语言代码)浏览:949 |
1642题解浏览:749 |
矩阵的对角线之和 (C语言代码)浏览:1380 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:760 |
多组数据新方法浏览:359 |