摘要:
题意:告诉某一天,然后往前和后各推一定天数,输出计算之后的日期。解法:一天一天模拟,日期的在各个位的进制不尽相同。代码如下:#include <cstdlib>#include <cstring>#include <cstdio>#include <algorithm>using namespace std;int month[13] = {31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};bool leap(int y) { return (y%4==0 && y%100!= 阅读全文
posted @ 2013-03-24 10:59
沐阳
阅读(415)
评论(0)
推荐(0)