← Back

Code Challenge 1.9 - Time Display


Objective

Create a console application that prompts the user to enter an hour value, a minute value, and either AM or PM. The program will then format and display the time in the correct format.

Skills to Practice

Challenge Tasks

Sample Output

Enter the hours value: 9 [Enter]
Enter the minutes value: 30 [Enter]
Enter AM or PM: AM [Enter]

Time: 9:30 AM