Question: Create a function that takes in three integer inputs and returns a single integer output. The input parameters are the hours, minutes and seconds variables
Create a function that takes in three integer inputs and returns a single integer output. The input parameters are the hours, minutes and seconds variables and the output is the total number of seconds.
Function Input: Three Integer Variables hours minutes, seconds
Function Output: One Integer Variable total seconds
In your main function read in three int values from the user and pass them to the function. Output the resulting calculation back in the main function.
Pseudocode example of the main function:
input hours
input minutes
input seconds
totalSeconds functionhours minutes, seconds
output totalSeconds
Calculating Total Seconds:
Use the following calculations to determine total seconds
Every hour is seconds
Add hours to total
Every minute is seconds
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
