Advertisement
Josif_tepe

Untitled

Jan 18th, 2024
640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 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 == 1) {
  9.         cout << 31 << endl;
  10.     }
  11.     if(mesec == 2) {
  12.         cout << 28 << endl;
  13.     }
  14.     if(mesec == 3) {
  15.         cout << 31 << endl;
  16.     }
  17.     if(mesec == 4) {
  18.         cout << 30 << endl;
  19.     }
  20.     if(mesec == 5) {
  21.         cout << 31 << endl;
  22.     }
  23.     if(mesec == 6) {
  24.         cout << 30 << endl;
  25.     }
  26.     if(mesec == 7) {
  27.         cout << 31 << endl;
  28.     }
  29.     if(mesec == 8) {
  30.         cout << 31 << endl;
  31.     }
  32.     if(mesec == 9) {
  33.         cout << 30 << endl;
  34.     }
  35.     if(mesec == 10) {
  36.         cout << 31 << endl;
  37.     }
  38.     if(mesec == 11) {
  39.         cout << 30 << endl;
  40.     }
  41.     if(mesec == 12) {
  42.         cout << 31 << endl;
  43.     }
  44.    
  45.    
  46.     return 0;
  47. }
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement