Advertisement
Josif_tepe

Untitled

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