Write a program that simulates a clock. Your program should allow a user to set the time of the clock and then check whether the time set is a valid time. Assume a 24 hour clock.
The main function should prompt a user for the hour, minute and second.
Store the three values in an array named clock. Assume the values entered are integers.
Write 3 functions validHour, validMinute and validSecond. These functions should each take an array as a parameter and return a bool value.
Declare 3 bool variables, validHr, validMin, and validSec to hold the values returned from the functions.
Your main function should call these three functions and if they all return true, then print valid time, otherwise print invalid time.