Question
How do I program this problem using c++.

TetragonaT boX Problem 3: Create a process to prompt the user to enter the number of seconds and determine the whole number of days, hours, minutes, and seconds corresponding to the entered number of seconds. For example if the number of seconds entered was 183945, then 2 days, 3 hours, 5 minutes and 45 seconds should be displayed. There are 86400 seconds in a day, 3600 seconds in an hour, and 60 seconds in a minute. Consider all values to be whole numbers ー》 白、白 esc
0 0
Add a comment Improve this question Transcribed image text
Answer #1

NOTE: I have completed code for your assignment. Please check and let me know if you have any questions. I will revert back within 24 hours.

Code: http://pasted.co/2483437b

code output:

inbox-madhavikn × How Do I program × <> Compile and Execu × G convert seconds tX * combinatorics-G × 2 objective c-Conve × O

Add a comment
Know the answer?
Add Answer to:
How do I program this problem using c++. Create a process to prompt the user to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program that asks the user to enter a number ofseconds.• There are...

    Starting Out with C++ (9th Edition)  Chapter 4, Problem 7PCWrite a program that asks the user to enter a number of seconds.• There are 86400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86400, the program should display the number of days in that many seconds.• There are 3600 seconds in an hour. If the number of seconds entered by the user is less than 86400, but is greater...

  • Create a C# Form with a textbox and a button. The box is for a user...

    Create a C# Form with a textbox and a button. The box is for a user to enter a number of seconds. And when the user clicks the button, the program displays the equivalent number of hours, minutes and seconds using a MessageBox. Show method. If the seconds entered is less than 60, your program should only display the seconds; if the seconds is a least 60 and less than 3600, your program should display minutes and seconds; if the...

  • PROBLEM 2 MATLAB It is often important to validate if the user entered an acceptable input...

    PROBLEM 2 MATLAB It is often important to validate if the user entered an acceptable input to a program. For this problem, you may safely assume that the user only enters positive integer inputs (ie.do not consider the case where the user inadvertently enters letters casos hovond thase in the sample user has entered negative numbers). Emulate the output format below: your code should print the autput exactly as shown in the sample runs, Your code should also he generalized...

  • C++ Question 6 (10pt): Convert seconds Write a program that takes a number of seconds as...

    C++ Question 6 (10pt): Convert seconds Write a program that takes a number of seconds as user input (as an integer) and converts it to hours, minutes, and seconds as shown below. You should convert the amount of time in such a way that maximizes the whole numbers of hours and minutes. Expected output 1 (bold is user input) Enter a number of seconds: 60 0 hour(s) 1 minute(s) 0 second(s) Expected output 2 (bold is user input) Enter a...

  • CSCI 161 - Lab 2: "Give Me a Second!" Overview This lab will have you developing...

    CSCI 161 - Lab 2: "Give Me a Second!" Overview This lab will have you developing a program that asks the user to input a time period as a number of seconds and in turn calculates the whole number of days, hours and minutes that are contained within the entered time period. Refer to the "Output Format" below for an example of what your program must do. The objectives of this lab are to reinforce and help teach: proper Java...

  • Write a program to prompt the user for hours and rate per hour using input to...

    Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Pay should be the normal rate for hours up to 40 and time-and-a-half for the hourly rate for all hours worked above 40 hours. Put the logic to do the computation of pay in a function called computepay() and use the function to do the computation. The function should return a value. Use 45 hours and a rate of 10.50 per...

  • Write a complete C program for an automatic teller machine that dispenses money. The user should...

    Write a complete C program for an automatic teller machine that dispenses money. The user should enter the amount desired (a multiple of 10 dollars) and the machine dispenses this amount using the least number of bills. The bills dispenses are 50s, 20s, and 10s. Write a function that determines how many of each kind of bill to dispense. When writing your function begin to pass your variables using pointers (or rather "pointing" to your data". Use the TimeSpace program...

  • Create a program using MIPS that does the following: The program will do the following: Prompt...

    Create a program using MIPS that does the following: The program will do the following: Prompt the user to enter a letter indicating Celsius or Fahrenheit C or c indicates that temperature entered is in Celsius. F or f indicates that temperature entered is in Fahrenheit. If the letter entered is not C, c, F, or f, print out error message "Wrong Letter!". Prompt the user to enter an integer indicating the temperature matching the letter just entered. Convert the...

  • C++ TrainStation Program Create a function called searchForSchedules that will: - prompt a user to enter...

    C++ TrainStation Program Create a function called searchForSchedules that will: - prompt a user to enter a scheduleId - search for arrival and departure times of trains based on a trains ID number Create a function called editSchedules that will: - allow the user to edit the fields for a given schedule that is in the linked list. - the program must prompt the user to enter the scheduleId as the key to find the schedule to edit. Print a...

  • Program C: Start by printing out your name, then your code should prompt the user to...

    Program C: Start by printing out your name, then your code should prompt the user to enter integers using the following prompt: Enter some integers, end with a 0: Your code should: Level 1 Task: count the number of integers entered (not including the 0) Level 2 Task: produce the sum of all of the integers Level 3 Task: produce the sum of the even integers These calculated values need to be displayed as follows: There were ___ numbers read...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT