X998: Time of Day in C++

Complete the function using a switch statement so that the variable am_pm is assigned the value 'A' if hour corresponds with any hour from 0 to 11. It should be given 'P' if hour corresponds with any hour from 12 to 23, but otherwise it should be '?'.

Your Answer:

Feedback

Your feedback will appear here when you check your answer.