Advertisement
Spocoman

02. Weekend or Working Day

Sep 4th, 2023
836
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     string day;
  7.     cin >> day;
  8.  
  9.     if (day == "Monday" || day == "Tuesday" || day == "Wednesday" || day == "Thursday" || day == "Friday") {
  10.         cout << "Working day" << endl;
  11.     }
  12.     else if (day == "Saturday" || day == "Sunday") {
  13.         cout << "Weekend" << endl;
  14.     }
  15.     else {
  16.         cout << "Error" << endl;
  17.     }
  18.  
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement