Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main (){
- int m;
- cin >> m;
- if(m == 1) {
- cout << 31 << endl;
- }
- else if(m == 2) {
- cout << 28 << endl;
- }
- else if(m == 3) {
- cout << 31 << endl;
- }else if(m == 4) {
- cout << 30 << endl;
- }else if(m == 5) {
- cout << 31 << endl;
- }else if(m == 6) {
- cout << 30 << endl;
- }else if(m == 7) {
- cout << 31 << endl;
- }else if(m == 8) {
- cout << 31 << endl;
- }else if(m == 9) {
- cout << 30 << endl;
- }
- else if(m == 10) {
- cout << 31 << endl;
- }else if(m == 11) {
- cout << 30 << endl;
- }else if(m == 12) {
- cout << 31 << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement