Question: 4. Write a program that asks the user to enter the number of seconds as an integer value and then displays the equivalent time in

 4. Write a program that asks the user to enter the

4. Write a program that asks the user to enter the number of seconds as an integer value and then displays the equivalent time in days, hours, minutes, and seconds. If the user does not enter an integer value, it asks the user to enter the input again. A way to check to see if a number is an integer is to look to see if x--round(x) where x is your input value. Two other useful function are the rem(x,y) function which gives the remainder when x is divided by y and the floor function which gives the floor of a number (number rounded towards -oo) The output for part (a) should look like: days hours = minutes seconds 365 17 46 40

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!