Question: write a program to print the message: Bye! See you on ! Where day of week is one of the days of the week (Monday-Sunday).
write a program to print the message:
Bye! See you on!
Where day of week is one of the days of the week (Monday-Sunday). Which day will be included in the message will be randomly generated (using the rand() function). For your input to match ours, you will need to set the seed before generating the random number.
To complete this program, do the following:
- Read an integer from standard input and use it to set the seed (set the value of the srand(int) function).
- Generate a random number between 0 and 6.
- Use the random number in a switch statement to pick the day of the week (from 0 = Monday, to 6 = Sunday).
- Print the message
Any attempt to hard code answers will result in a 0 for the exercise.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
