文章
1
粉丝
0
获赞
1
访问
17
#include<stdio.h>
#include <iostream>
#include<math.h>
#include <string.h>
#include<algorithm>
using namespace std;
int totaldays(int month,int day)
{
int days=0;//1 3 5 7 8 10 12
//4 6 9 11
if(month==4){days=day-12;return days;}
else{
switch(month)
{
case 5:return day+18;
case 6:return 18+31+day;
case 7:return 18+31+30+day;
case 8:return 18+31+30+31+day;
case 9:return 18+31+30+31+31+day;
case 10:return 18+31+30+31+31+30+day;
case 11:return 18+31+30+31+31+30+31+day;
case 12:return 18+31+30+31+31+30+31+30+day;
}
}
}
int main ()
{
int month;
int day;
cin>>month;
cin>>day;
int days=totaldays(month...
登录后发布评论
暂无评论,来抢沙发