Advertisement
Josif_tepe

Untitled

Jan 20th, 2024
530
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int mesec;
  6.     cin >> mesec;
  7.    
  8.     if(mesec == 2) {
  9.         cout << 28 << endl;
  10.     }
  11.    
  12.     if(mesec == 1 or mesec == 3 or mesec == 5 or mesec == 7 or mesec == 8 or mesec == 10 or mesec == 12) {
  13.         cout << 31 << endl;
  14.     }
  15.     if(mesec == 4 or mesec == 6 or mesec == 9 or mesec == 11) {
  16.         cout << 30 << endl;
  17.     }
  18.    
  19.     return 0;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement