Design an algorithm that will prompt for and receive the time expressed in 2400 format (e.g. 2305 hours), convert it to 12-hour format (e.g. 11.05 pm) and display the new time to the screen. Your program is to repeat the processing until a sentinel time of 9999 is entered.
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
Design of the algorithm
Obs1. As structure we must use a DOWHILE processing for all inputs received. The logical succession of steps of the algorithm is as below.
Obs2. H stands for “hours” and M stands for “minutes”.
Obs3. If hours is greater or equal to 12 it means we are in P.M. zone, otherwise in A.M. zone of the day....
This is only a preview of the solution. Please use the purchase button to see the entire solution