Write a program to calculate the number of seconds since midnight. for example, suppose the time is 1: 02: 05 am. since there are 3600 seconds per hour and 60 seconds per minutes, it has been 3725 seconds since midnight (3600 * 1 + 2 * 60 + 5 = 3725). the program asks the user to enter 4 pieces of information: hour, minute, second, and am/pm. the program will calculate and display the number of seconds since midnight. [hint: be very careful when the hour is 12].

Solved
Show answers

Ask an AI advisor a question