Advertisement
Josif_tepe

Untitled

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