文章
4
粉丝
106
获赞
0
访问
1.9k
#include<iostream>
using namespace std;
int main(){
int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int year,day,mon,sum=0,flag=0;
while(cin>>year>>mon>>day){
flag=0;month[2]=28;sum=0;
if(mon<=12&&mon>=1){
if(year>0){
if((year%4==0&&year%100!=0)||(year%400==0)) month[2]=29;
if(day>=1&&day<=month[mon]){
flag=1;
for(int i=1;i<mon;i++){
sum+=month[i];
}
...
登录后发布评论
暂无评论,来抢沙发