Advertisement
myloyo

3.2.6

Oct 31st, 2022 (edited)
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <iomanip>
  4.  
  5. using namespace std;
  6. int main()
  7. {
  8.     int m, c;
  9.     cin >> m;
  10.     c = m % 12;
  11.     switch (c) {
  12.     case 0:
  13.         cout << "December" << endl; break;
  14.     case 1:
  15.         cout << "Janurary" << endl; break;
  16.     case 2:
  17.         cout << "February" << endl; break;
  18.     case 3:
  19.         cout << "March" << endl; break;
  20.     case 4:
  21.         cout << "April" << endl; break;
  22.     case 5:
  23.         cout << "May" << endl; break;
  24.     case 6:
  25.         cout << "June" << endl; break;
  26.     case 7:
  27.         cout << "July" << endl; break;
  28.     case 8:
  29.         cout << "August" << endl; break;
  30.     case 9:
  31.         cout << "September" << endl; break;
  32.     case 10:
  33.         cout << "October" << endl; break;
  34.     case 11:
  35.         cout << "November" << endl; break;
  36.     }
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement