1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ipatiy [6.2K]
3 years ago
10

Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burn

ing_heart_rate() to calculate the fat burning heart rate. The adult's age must be between the ages of 18 and 75 inclusive. If the age entered is not in this range, raise a ValueError exception in get_age() with the message "Invalid age." Handle the exception in __main__ and print the ValueError message along with "Could not calculate heart rate info." Ex: If the input is: 35 the output is: Fat burning heart rate for a 35 year-old: 129.5 bpm If the input is: 17 the output is: Invalid age. Could not calculate heart rate info.
Computers and Technology
1 answer:
gayaneshka [121]3 years ago
8 0

Answer:

#include <iostream>

# include <conio.h>

using namespace std;

float fat_burning_heart_rate(float age);

main()

{

float age,bpm;

cout<<"enter the age of the person"<<endl;

cin>>age;

if (age>=18 && age<=75)

{

bpm=fat_burning_heart_rate(age);

cout<<"fat burning heart rate for the age of"<<age<<"="<<bpm;

}

else

cout<<"Invalid age";

getch();

}

float fat_burning_heart_rate(float age)

{

 

float a;

 

a= (220-age)*0.7;

return a;

}

Explanation:

In this program, the variable named as age has been taken to enter the age of the person, needs to calculate the burning heart rate. All the variables taken in float, as the age and fat burning heart rate should come in decimal value.

The formula has been used as mention in question that,

a= (220-age)*0.7;

You might be interested in
Helpppppp me please cuz its due rn. put the correct word in the correct spot
tiny-mole [99]

Answer:

Inside air pressure goes on the top in the inside.

Air moves goes into the bottom box.

Outside air pressure goes on the top.

Balloon moves goes on the inside bottom.

6 0
3 years ago
Which is considered to be the oldest form of social media? A. media-sharing sites B. location-based services C. social networkin
neonofarm [45]

Answer:

b location based services

Explanation:

:)

4 0
3 years ago
What are some options available when using the Replace feature?
3241004551 [841]

Assuming that the user is talking about Microsoft Word, the options available when using the replace feature include replace, replace all, and find next. First, the Find what and Replace with boxes locates a word or phrase and replaces it with the new text. Selecting the replace option will update one instance while the replace all option will update all instances without stopping at each one. You can click on the Find Next several times until you come to the instance that you want to update.

8 0
3 years ago
Que Inventos Importantes se Crearon durante la edad de agua y viento
ss7ja [257]

Answer:

Sep 24, 2016 · Que inventos importantes se crearon durante la edad del agua y el viento Recibe ahora mismo las respuestas que necesitas!

Explanation:

3 0
3 years ago
1. It is acceptable to use a jack that has been
krok68 [10]
D. None of the above
7 0
3 years ago
Other questions:
  • Write an original idiom that uses the word dog or dogs im in 4th
    5·2 answers
  • Upgrading only the motherboard will give some performance improvement to a computer system. Why would the improvement be limited
    14·1 answer
  • Which information is considered free for use?
    9·2 answers
  • The three tasks within data harmonization, namely: data consolidation, data cleansing, and data formatting use techniques called
    8·1 answer
  • Displays are geared for a specific resolution. what is this resolution called?
    15·1 answer
  • You recently upgraded your computer and added an extra 512 MB of RAM. Consequently, you want to increase your swap space by addi
    10·1 answer
  • g Q 2 Suppose I need a data structure having the following characteristics: a) must be very space efficient, and b) I have a goo
    6·1 answer
  • What is a Hard Drive
    13·1 answer
  • What is HTML? (list down any 5 points)
    12·1 answer
  • Define Agricultural Era
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!