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
What will be the topic of the essay?
bonufazy [111]
Are actors and athletes paid too much?
8 0
3 years ago
You can add multiple worksheets to a workbook by clicking the home tab on the ribbon, pressing and holding ____, and then clicki
koban [17]
<span>You can add multiple worksheets to a workbook by clicking the home tab on the ribbon, pressing and holding shift , and then clicking the number of existing worksheet tabs that correspond with the number of sheets you want to add, clicking the insert list arrow in the cells group on the home tab, then clicking insert sheet.</span>
4 0
3 years ago
True or Flase<br><br> In C++, the body of a for loop may never run even once.
stiks02 [169]

Answer: True

Explanation: For loop is used in the C++ programming is defined as the statement that defines about the flow control .This loop works under some condition that is considered.

For loop is evaluated to execute for one time if the statement condition is true but there are also chances of no execution at all because of the incorrect condition. So, for loop might not run even once in that condition.Thus , the statement given is true.

3 0
3 years ago
What is APR?
omeli [17]

Answer:

APR is the Interest rate advertised by lenders.

Explanation:

APR is the annual percentage rate that is different from the interest rate. Interest rate is the rate of borrowing money. While APR is the rate which includes interest rate, processing fee and other cost that are involved in loan approving.

This cost is decided by lender, which may be equal to interest rate or greater than interest rate.

5 0
3 years ago
)What item is at the front of the list after these statements are executed?
Dominik [7]

Answer:

C.Rudy

Explanation:

A deque waitingLine is created.Then Jack is added to front of the deque first.After that Rudy is added to the front of the deque.AFter that Larry and sam are inserted at the back.So the last item inserted at the front is front of the deque.So Rudy was the last item inserted at the front.

Hence we conclude that the answer is Rudy.

4 0
3 years ago
Other questions:
  • A _____ is a predefined text format that includes multiple formatting options.
    14·1 answer
  • A(n) _____ evaluates a specified data set and returns certain fields from that data set as instructed.
    10·2 answers
  • What is an input, output and storage device?
    12·1 answer
  • Which keyboard feature is a form feed character?
    15·1 answer
  • Illia is a network administrator at a company.which tasks is she responsible for
    9·1 answer
  • How I to turn this ''loop while'' in ''loop for''? var i = 0; while (i &lt; 20) { var lineY = 20 + (i * 20); line(0, lineY, 400,
    11·1 answer
  • What is the 5 basic steps of computer programing?
    6·1 answer
  • Which question about whale sharks is nonscientific?
    11·2 answers
  • Which one my guys I need help
    7·1 answer
  • When working in outline mode, press __________ and click the eye icon to change only one layer back to preview mode.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!