Write program that asks the user to enter a time duration

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

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: EM131743194

Questions Cloud

Selecting a week that contained overtime? wages : Are the events? "selecting a week that contained overtime? wages" and? "selecting a week that contained temporary help? wages" mutually? exclusive?
Define the orphan boy and the magic stone : The Orphan Boy and the Magic Stone discuss its main character
Interpreting simple linear regression : a. What is meant by a hypothesis? What is the null hypothesis in this example
What, in your opinion, are the most important characteristic : Describe the character you have chosen to write about in your final project. Give us an overview of why you chose him or her
Write program that asks the user to enter a time duration : 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
Design an advertising campaign for them : Sine the eighties, Donatillo's restaurant satisfied its customers through its food options, which brought Italian tastes to American homes in Seattle.
Specify the competing hypotheses to determine : a. Specify the competing hypotheses to determine if the player has a higher scoring average in home games.
Discuss how one of the literary elements contributes : discuss how one of the literary elements contributes to the power of the work. You will need to be specific
Type of test for population means : What type of test for population means should be performed when examining a situation in which employees are first tested, then trained, and finally retested?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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