Note: Some data input to this program and some program output depends on your name. If...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Note: Some data input to this program and some program output depends on your name. If you do not use your name as required, points will be deducted for this assignment. One of the most popular New Year's resolutions is to commit to an exercise program, but the exercise part is not always so popular. Perhaps the most common excuse for this is that it is hard to find the time to work out. For this assignment you are going to write a program that will help people plan their workouts. The number of calories burned during a workout routine depends on three things: 1. The types of activities participated in. 2. The amount of time spent engaged in each activity. 3. The weight of the person doing the exercise. The intensity of a particular activity can be measured using the amount of calories that are burned in a single minute per pound of a person's weight. For example, here is the burn rate per pound for the following activities: ● ● ● The burn rate is calculated by multiplying the burn rate per pound by the person's weight. This is then multiplied by the number of minutes to get the total calories burned. Using the information above your program must do the following: 1. Display a welcome message. 2. Prompt the user for his or her weight in pounds. 3. Prompt the user for the number of minutes spent engaging in each of the four activities shown above. 4. 5. 6. Badminton: .044 cal/lb Running: .087 cal/lb Walking: .036 cal/lb Weight Training: .042 cal/lb 8. Calculate the calories burned for each activity using the values listed above. Calculate the total number of calories burned. Calculate the total amount of time spent working out in hours and minutes. This can be done by adding up the minutes spent in each activity and using the / and % operators to calculate the quotient and remainder produced by dividing this number by 60. (For example: 256 minutes divided by 60 gives a quotient of 4 and a remainder of 16, so it translates to 4 hours and 16 minutes.) 7. Display the amount of minutes spent and calories consumed for each activity if the user entered a number greater than zero. Display the total time spent working out in hours and minutes and the total number of calories burned. Note: Some data input to this program and some program output depends on your name. If you do not use your name as required, points will be deducted for this assignment. One of the most popular New Year's resolutions is to commit to an exercise program, but the exercise part is not always so popular. Perhaps the most common excuse for this is that it is hard to find the time to work out. For this assignment you are going to write a program that will help people plan their workouts. The number of calories burned during a workout routine depends on three things: 1. The types of activities participated in. 2. The amount of time spent engaged in each activity. 3. The weight of the person doing the exercise. The intensity of a particular activity can be measured using the amount of calories that are burned in a single minute per pound of a person's weight. For example, here is the burn rate per pound for the following activities: ● ● ● The burn rate is calculated by multiplying the burn rate per pound by the person's weight. This is then multiplied by the number of minutes to get the total calories burned. Using the information above your program must do the following: 1. Display a welcome message. 2. Prompt the user for his or her weight in pounds. 3. Prompt the user for the number of minutes spent engaging in each of the four activities shown above. 4. 5. 6. Badminton: .044 cal/lb Running: .087 cal/lb Walking: .036 cal/lb Weight Training: .042 cal/lb 8. Calculate the calories burned for each activity using the values listed above. Calculate the total number of calories burned. Calculate the total amount of time spent working out in hours and minutes. This can be done by adding up the minutes spent in each activity and using the / and % operators to calculate the quotient and remainder produced by dividing this number by 60. (For example: 256 minutes divided by 60 gives a quotient of 4 and a remainder of 16, so it translates to 4 hours and 16 minutes.) 7. Display the amount of minutes spent and calories consumed for each activity if the user entered a number greater than zero. Display the total time spent working out in hours and minutes and the total number of calories burned.
Expert Answer:
Answer rating: 100% (QA)
It appears that you are being asked to design a program based on the given specifications for calculating calories burned during different workout act... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
What are some of the pros and cons of shifting elements of the portfolio, including rebalancing or making investment changes in terms of their tax liability? Showing full detail and specific examples...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
2. Imagine a college basketball team has the following supply and demand figures for a typical game: Price 8 16 24 32 40 Quantity Demanded 28000 22000 16000 10000 4000 Quantity Supplied 16000 16000...
-
The H3 molecular ion, which plays an important role in chemical reactions occurring in interstellar clouds, is known to be equilateral triangular. (a) Identify the symmetry elements and determine the...
-
Given a Q-point of IDQ = 3 mA and VGS = -3 V, determine IDSS if VP = -6 V.
-
If the lift coefficient for a Boeing 777 aircraft is 15 times greater than its drag coefficient, can it glide from an altitude of \(30,000 \mathrm{ft}\) to an airport \(80 \mathrm{mi}\) away if it...
-
Levon Helm was a kind of one-man mortgage broker. He would drive around Tennessee looking for homes that had second mortgages, and if the criteria were favorable, he would offer to buy the second...
-
A crane lifts a load with a force of 1000 N over a distance of 10 meters in 20 seconds. What is the average power generated by the crane?
-
1. As Jamie Lee and Ross review their assets, can you tell them which will be valuable to them for income as retirement approaches? 2. Jamie Lee and Ross estimate that they will have one million...
-
One of The Tax Museum's chief rivals, Fiscal Fossils, has two shareholders, Sarah and Jerry, each of whom own 50 percent of the outstanding stock. Fiscal Fossils has the following assets and faces a...
-
1. HOW MUCH IS THE CONVERSION COST 2. HOW MUCH IS THE RAW MATERIALS END 3. HOW MUCH IS THE PRIME COST 4. HOW MUCH IS THE COST OF GOODS SOLD 5. HOW MUCH IS THE COST OF GOODS...
-
Solve the equation by the square root property. (z+7) = -64
-
A young boy set up an aquarium containing 120 liters of water and six fish. The capacity for the aquarium is ten fish. By the end of the first year, four fish were added to the aquarium and two of...
-
During the most recent year, the firm estimated that it would pay $240,000 to its consultants and incur indirect operating costs of $360,000. Actual consultant labor costs were $255,000 and actual...
-
Multiply. 2 3 4x 15ax 5a 2x Simplify your answer as much as possible. M B
-
Use the image below to answer the following question: 13 12 What relationship do the ratios of sin x and cos y share?
-
Suppose that you are part of a virtual team and must persuade other team members on an important matter (such as switching suppliers or altering the project deadline). Assuming that you cannot visit...
-
Frederick (Freddy) Freeweights (age 42) owns and operates a health club called ''Treadmills West.'' The business is located at 4321 Arnold Street, Alpine, CA 91901. Freddy had the following income...
-
Kent Pham, CPA, is a 45-year-old single taxpayer living at 169 Trendie Street, La Jolla, CA 92037. His Social Security number is 865-68-9635. In 2012, Kent's W-2 as the controller of a local...
-
Sally and Charles Heck received the following dividends and interest during 2012: Assuming the Hecks file a joint tax return, complete Schedule B of Form 1040 (on page 2-33) for them for the 2012 tax...
-
The state-space representation is based on a state function \(x\) satisfying the first order ODE \(\tau_{1} \dot{x}=x_{o}\left(\alpha-\tau_{2} \dot{\alpha} ight)-x\), where argument...
-
Obtain the vortex lift line slope, given by Eq. 8.14, for a supersonic delta wing. Eq. 8.14 Ky = -(cos A) ?
-
The delta wing given in Fig. 8.59 has the supersonic lift line slope, according to Puckett and Stewart, as follows \[ \begin{aligned} & \frac{d C_{l}}{d \alpha}=\left(2 \pi \cot \Lambda /...
Study smarter with the SolutionInn App