编程题#4:Tomorrow never knows?以玩家的心态测试
平时没有发布自己代码的习惯,但是今天这是个血的教训啊!!看了好久也没找出问题,然后就决定使用测试用例测试,结果还是忘了一种可能..那就是,2014-02-29,只顾着写闰年的逻辑,过年的逻辑,万万没想到…居然忘了闰日的逻辑…
总结原因就是,一只踩着认为有坑的地方不放,结果原来一直在坑里…
#include <iostream>
#include <iomanip>
#include <string.h>
#include <stdio.h>
using namespace std;
bool IsLeapYear( int year ){
bool isLeap = false;
if(year % 100 == 0 &&