Answered step by step
Verified Expert Solution
Question
1 Approved Answer
All decimals places to two pls. Your program should prompt the user for some number of seconds. It will then determine if the number of
All decimals places to two pls.
Your program should prompt the user for some number of seconds. It will then determine if the number of seconds entered is (a) less than 60 seconds, in which case it will report in seconds, (b) between 60 seconds but less than 3,600 seconds, in which case it will print a report in minutes, (c) between 3,600 seconds but less than 86,400 seconds, in which case it will print a report in hours, or (d) greater than 86,400 seconds, in which case it will print a report in days. An ifelse-if sequence (Gaddis, p. 176) would be a natural solution to this problem. Also, for the moment, you do not have to worry about input validation (e.g., checking to make sure the number is positive). Some example runs might look like: 45 Please enter the number of seconds: 45 seconds is 45.00 seconds. Please enter the number of seconds 1234 seconds is 20.57 minutes. 1234 52134 Please enter the number of seconds: 52134 seconds is 14.48 hours. 100000 Please enter the number of seconds 100000 seconds is 1.16 daysStep 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