第几天
来源:互联网 发布:斗鱼刷人气软件源代码 编辑:程序博客网 时间:2024/06/09 19:44
#include<stdio.h>
int main()
{
int year, mon, day, isLeap, i, count;
int month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
scanf("%d-%d-%d", &year, &mon, &day);
if ((year % 400 == 0) || (year % 100 != 0 && year % 4 == 0) )
isLeap = 1;
else isLeap = 0;
count = 0;
month[2] = month[2] + isLeap;
for (i = 1; i < mon; i++){
count += month[i];
}
count += day;
printf("%d",count);
return 0;}
0 0
- 第几天
- 【第几天?】
- 第几天?
- 第几天
- 第几天?
- 第几天
- 第几天
- 第几天?
- 第几天
- 第几天
- 第几天?
- 第几天
- 第几天?
- 第几天
- 第几天
- 第几天?
- 第几天?
- 第几天
- 统计字符个数
- encache缓存网页
- 设计模式-观察者模式(4)
- getcurrtsession与opensession的区别
- c++中CString,int,float类型转换
- 第几天
- 淘宝优惠券、红包、代金券免费领取,淘宝购物券
- leetcode 448Find All Numbers Disappeared in an Array (array)
- Java入门1-搭建环境,编写简单程序
- 在eclipse中如何快速打开项目源文件
- hibernate中json序列化对象时lazy已关闭异常的处理
- Week6:Advice for Applying Machine Learning课后习题解答
- 我的记事本之-SQLite数据库的使用
- leetcode 29 - Divide Two Integers