Oldw1

Untitled

Oct 21st, 2021
783
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int main()
  2. {
  3.     int value;
  4.     cout<<"Enter month number (1-12): ";
  5.     cin >> value;
  6.     if (value == 1 || value == 3 || value == 5 || value == 7 || value == 8 || value == 10 || value == 12) {
  7.         cout<<"Number of days : 31 days";
  8.     } else if (value == 2) {
  9.         cout<<"Number of days : 28/29 days";
  10.     } else if (value == 4 || value == 6 || value == 9 || value == 11) {
  11.         cout<<"Number of days : 30 days";
  12.     } else {
  13.         cout<<"Please enter month number between (1-12).";
  14.     }
  15.     return 0;
  16. }
  17.  
RAW Paste Data