Question: Display the Clocks This function takes in three parameters, h , m , and s , which represent the hours ( 0 - 2 3

Display the Clocks
This function takes in three parameters, h, m, and s, which represent the hours (0-23), minutes (0-59), and seconds (0-59) of the current time, respectively.
You can assume that you have access to the following functions:
nCharString(n, c): Returns a string of n characters, where each character is c.
formatTime12(h, m, s): Returns the formatted time in 12-hour clock format, given the current time in hours, minutes, and seconds.
formatTime24(h, m, s): Returns the formatted time in 24-hour clock format, given the current time in hours, minutes, and seconds.
To complete this function, follow the comments provided:
Print a line consisting of 27 stars, 3 spaces, and another 27 stars.
Print a line consisting of 1 star, 6 spaces, "12-HOUR CLOCK", 6 spaces, another star, and 3 spaces.
Print a line consisting of 1 star, 6 spaces, "24-HOUR CLOCK", 6 spaces, another star, and a line break.
Print a blank line.
Print a line consisting of 1 star, 6 spaces, the formatted time in 12-hour clock format, 7 spaces, another star, and 3 spaces.
Print a line consisting of 1 star, 8 spaces, the formatted time in 24-hour clock format, 9 spaces, another star, and a line break.
Print a line consisting of 27 stars, 3 spaces, and another 27 stars.
Here's the function signature for reference:
void displayClocks(unsigned int h, unsigned int m, unsigned int s){// TODO: Your code here, follow the comments for each line }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!