Program that asks the user to enter a time duration in hours

Assignment Help C/C++ Programming
Reference no: EM132052123

Write program that asks the user to enter a time duration in hours, minutes, and seconds and then displays the time in terms of hours in decimal format. There are 60 minutes in an hour, and there are 60 seconds in a minute. Represent these number of minutes in an hours and number of seconds in a minute as constant in your program.You should use a separate variable for each input value.Please make sure that minutes and seconds are less than and equal to 59. If the users enter this more than 59 or negative it should be asking him to reenter the information.

A sample run should look like this (user input is in bold):

Enter a hours, minutes, and seconds:

First, enter the hours: 10

Next, enter the minutes: 30

Finally, enter the seconds:30

10 hours, 30 minutes, 30 seconds = 10.50833 hours

At the end of the inputs and after display of the results, you should ask the user if he wants to continue, and if the input is 'Y' you should repeat the process.

Reference no: EM132052123

Questions Cloud

While loop and for loop in matlab : What is the difference between the while loop and for loop in matlab?
What type of leadership is most effective : MADS 6658 - Leadership Global Advanced Scholarship - Fairleigh Dickinson University - What type of leadership is most effective in the 21st century organization
Describe the security issues of bcbst : Describe the security issues of BCBST in regard to confidentiality, integrity, availability, and privacy based on the information provided in the BCBST case.
What are the logical steps the automobile takes : What is your expected output? What are the logical steps the automobile takes to complete the turn?
Program that asks the user to enter a time duration in hours : Write program that asks the user to enter a time duration in hours, minutes, and seconds and then displays the time in terms of hours in decimal format.
Write the most important suggestions from the plan : Search the Internet for IT governance planning. Select a specific governance plan that exists at a company or a plan framework from an organization.
Receipt that contains all the information about their cheese : Vic wants to provide his customers with a receipt that contains all the information about their cheesecake and the total purchase price
Analyze proper physical access control safeguards : Analyze proper physical access control safeguards and provide sound recommendations to be employed in the registrar's office.
Programming using arrays and pointers assignment : Reference the following instructions to assist you when completing your Programming Using Arrays and Pointers assignment.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Algorithm and create a flowchart

Write an algorithm and create a flowchart which simulate the testing for cell phone PIN. If the user entered the correct pin code, display "Welcome to DLM Telecom".

  C++ class that has a dynamic array of a string

show  an example of a C++ Class that has a dynamic array of a string that takes in names by user input??

  Create a simple home utility auditing program.

Design, implement, test, and debug a Visual Basic® program to create a simple home utility auditing program.

  Calculate the score percentage

If the input value within the valid range, the program will display a "good score" message; otherwise, the program will display an error message and then terminate the program. The program will then calculate the score percentage and then determin..

  Calculates the average of those numbers

Write a C program which takes n number of element from user (where, n is specified by user), stores data in an array and calculates the average of those numbers. Output of the program should look like this;

  Prepare a program to implement a for loop

Prepare a program to implement a for loop - Program: Write a for loop that sums all the odd integers between 5 and 20 inclusive.

  Compute sums for each of the two inventories

The object is to compute sums for each of the two inventories and generate a total inventory count for each one. i need to print out the total number of items found in each inventory, total counts and the average for each inventory.

  Write a c program that reads in two sets of numbers a and b

Write a C program that reads in two sets of numbers A and B, and calculates and print their union (AυB) and intersection (A∩B). (AυB) is the set of elements that appear in either A or B, and thatA∩B is the set of elements that appear in both A and B...

  Write accessor funtions for height, width, and depth.

Write accessor funtions for height, width, and depth.Also, what exactly is an accessor function?

  Prefetching is a technique that leverages predictable

Prefetching is a technique that leverages predictable address patterns to speculatively bring in additional cache blocks when a particular cache block is accessed. One example of prefetching is a stream buffer that prefetches sequentially adjacent..

  Write c++ programs

Write a C++ program to accept distance in kilometers, coverts it to meters and then displays the result. Write a C++ program to find area and circumference of a circle.

  Create a program that calculates the volume of a cylinder

Create a program that calculates the volume of a cylinder requesting input from the console for the radius and height dimensions.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd