Question: Can you help me with code in c++ HMS-S Structure: Create a structure named Time with 3 member data of type int. These data must
Can you help me with code in c++
HMS-S Structure: Create a structure named Time with 3 member data of type int. These data must be called hours, minutes and seconds. Write a program that asks the user enter a time value in hours, minutes, and seconds (following the format 12:59:59). Data can be entered in the following ways: Enter a time value in hours and minutes: 12 59 59 Enter a time value in hours and seconds Enter the hours: 12 Enter the minutes: 59 Enter the seconds: 69 Once the data is entered the program must store the data entered in the structure created, and finally print the total number of seconds on the screen. This is calculated using the following formula, assuming that there exists an instance of the time structure called t long total_secs t.hours 3600+t.minutes * 60 + t.seconds
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
