Advertisement
Josif_tepe

Untitled

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