#include "stdafx.h" #include
static int year_no[12]={31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};//非闰年 static int year_yes[12]={31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};//闰年
class date { private: int year,month,day; public: date(); int Sample_inpute(); int run(); };
date::date() { }
int date::Sample_inpute() { int y; int m; int d; cout<<"请输入年月日,并用空格隔开它们:"; cin>>y>>m>>d; year=y; month=m; day=d; return 0;}
int date::run(){ int sum_d=0; int i; if(((year%4==0)&&(year%100!=0))||(year%400==0))//判断是不是闰年 { for(i=0;i
搞了几次 都这样 你自己排一下吧
使用的语言?