文章
20
粉丝
0
获赞
35
访问
1.0k
#include<bits/stdc++.h>
using namespace std;
struct{
int y, m, d;
}t;
int m_d[] = {0, 31, 28, 31, 30,
31, 30, 31, 31,
30, 31, 30, 31};
int main(){
while(cin >> t.y >> t.m >> t.d){
int day = 0;
if(t.m < 1 || t.m > 12)
cout << "Input error!" << endl;
else if(t.d <= 1 || t.d > 31)
cout << "Input error!" << endl;
else if(t.m == 2 && (t.d > 28))
cout << "Input error!" << endl;
 ...
登录后发布评论
暂无评论,来抢沙发