Advertisement
josiftepe

Untitled

Jan 28th, 2021
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main (){
  5.     int m;
  6.     cin >> m;
  7.    
  8.     if(m == 1) {
  9.         cout << 31 << endl;
  10.     }
  11.     else if(m == 2) {
  12.         cout << 28 << endl;
  13.     }
  14.     else if(m == 3) {
  15.         cout << 31 << endl;
  16.     }else if(m == 4) {
  17.         cout << 30 << endl;
  18.     }else if(m == 5) {
  19.         cout << 31 << endl;
  20.     }else if(m == 6) {
  21.         cout << 30 << endl;
  22.     }else if(m == 7) {
  23.         cout << 31 << endl;
  24.     }else if(m == 8) {
  25.         cout << 31 << endl;
  26.     }else if(m == 9) {
  27.         cout << 30 << endl;
  28.     }
  29.     else if(m == 10) {
  30.         cout << 31 << endl;
  31.     }else if(m == 11) {
  32.         cout << 30 << endl;
  33.     }else if(m == 12) {
  34.         cout << 31 << endl;
  35.     }
  36.   return 0;
  37. }
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement