Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started