Advertisement
desislava_topuzakova

02. Weekend or Working Day

Jan 23rd, 2022
619
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.    
  8.     string dayName;
  9.  
  10.     cin >> dayName;
  11.  
  12.     string output;
  13.  
  14.     if (dayName == "Monday") {
  15.         output = "Working day";
  16.     } else if (dayName == "Tuesday") {
  17.         output = "Working day";
  18.     } else if (dayName == "Wednesday") {
  19.         output = "Working day";
  20.     } else if (dayName == "Thursday") {
  21.         output = "Working day";
  22.     } else if (dayName == "Friday") {
  23.         output = "Working day";
  24.     } else if (dayName == "Saturday") {
  25.         output = "Weekend";
  26.     } else if (dayName == "Sunday") {
  27.         output = "Weekend";
  28.     } else {
  29.         output = "Error";
  30.     }
  31.  
  32.     cout << output << endl;
  33.  
  34.     return 0;
  35. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement