X1175: Classes per day in C++

Write a function called school that takes a string that represents the day of the week and displays the corresponding message:

  • monday: you have 4 classes
  • tuesday: you have 2 classes and 1 lab
  • wednesday: you have 2 classes and 2 labs
  • thursday: you only have 1 class today
  • friday: you have 3 classes

You can assume the day will be in all lower-case letters. The message should finish with an end-of-line, unless the string has none of the above days. In that situation, there should be no output.

Your Answer:

Reset

Practice a different C++ exercise

Feedback

Your feedback will appear here when you check your answer.