Write a program that updates the time by one second


Problem:

Question 1- Write a program that updates the time by one second. Use a struct with three integer members representing hours, minutes and seconds. The program should accept military time expressed using a twenty four-hour clock. Output the updated time as being A.M. or P.M.

Question 2- Write a program, which accepts as input the date and outputs the date one-week in the future. Assume that the date is represented as three integers in the form mm dd yyyy, where mm is the month, dd the day in month and yyyy the year. A year is a leap year if the following conditions hold; the year is divisible by 4 and not divisible by 100, or the year is divisible by 400.

Please describe the code step by step and also explain with the help of comments.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program that updates the time by one second
Reference No:- TGS0893283

Expected delivery within 24 Hours