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]
4 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]4 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
what optimizes airflow, keeps cylinder pressure in a certain range, and determines the engine's operating range?
emmainna [20.7K]
If you have choices, then I mut assume that these are following:
A. valve lift
B. push rod
C. intake manifold
D. valve timing. I think the answer is letter A.
6 0
4 years ago
PLEASE HELP THANK YOU
Andrei [34K]

Answer:

1) A string is "non-numeric data".  In other words, it is text.

2) False, a runtime error means that there is a problem, but it will be with the software, not the hardware.

3) An impossible task such as dividing five by zero is a logical error.  Not using quotes on a string would be a syntax error, printing an inaccurate statement is not an error at all (as far as the program is concerned anyway), and using camelcase on a variable with multiple words is a common convention.

4) variableName = "value"

5) The code provided here is illegible, so I can't give a straight answer. It seems to be missing operators.

6 0
3 years ago
What is parallelism of microinstruction
Kitty [74]
The answer is Hardware level works upon dynamic parallelism whereas, the software level works on static parallelism. Dynamic parallelism means the processor decides at run time which instructions to execute in parallel,
8 0
3 years ago
6. How might you go about securing an internship or job on LinkedIn?
Greeley [361]
Seems nice I mean yeah its be fine
4 0
4 years ago
Read 2 more answers
The area where a blast originates is referred to what perimeter/isolation zone
Anna [14]
The area where a blast originate from is referred to as PERIMETER. After a bomb blast incident, the first responders has to map out a safe pre-blast perimeter based on the requirements of Bureau of Alcohol, Tobacco, Firearms and Explosives [BATFE]. After this, the first inner perimeter, also called hot zone must be established. This is where the blast originated from and it is the point where victims rescue and treatment will start.
8 0
3 years ago
Other questions:
  • Which of the following is true about the strategy that uses page fault frequency (PFF) to prevent thrashing?
    6·2 answers
  • Input numbers and segregate them by placing their values into even or odd vectors based upon their value being even or odd. Then
    12·1 answer
  • How does an ALU perform logical operations?
    6·1 answer
  • Answer to this if you have apex legends on either pc xbox one or PS4 for the one that answers and does gets brainliest please do
    7·2 answers
  • Which is the most likely reason film companies expanded so quickly?
    8·1 answer
  • If you have a second Ethernet adapter, which network location is being used by the adapter?
    5·1 answer
  • Jason has decided to use his name on all the images to protect them from misuse. He has also decided to use the logo of his comp
    15·2 answers
  • 20. Describe the steps that transform a program written in a high-level language such as C into a representation that is directl
    9·1 answer
  • 4.1 code practice python
    13·1 answer
  • Question2.<br> What are the functions of information technology?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!