文章
37
粉丝
98
获赞
4
访问
24.1k
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
int cnt;
int nums[13] = { 0,30,28,31,30,31,30,31,31,30,31,30,31 };
if (2009 % 4 == 0 && 2009 % 100 != 0 || 2009 % 400 == 0) {
nums[2] = 29;
}
while (cin >> cnt) {
int n, month = 1, day = 1, hour = 0, minute = 0, second = 0;
//多少天
day = cnt / (24 * 60 * 60);
//开始定日期
if (day != 0) {
if (day < nums[1]) {//因为从1开始算的天数
day++;
}
else {
for (int k = 1; k < 13; k++) {
...
登录后发布评论
暂无评论,来抢沙发