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
Rows within a spreadsheet are identified by:
EleoNora [17]

Answer:

Option C: Numbers.

Explanation:

By default, rows within a spreadsheet are identified by Numbers i.e. 1,2,3,............

Total rows are 1048575 in one spreadsheet.

7 0
3 years ago
Write an efficient C++ function that takes any integer value i and returns 2^i ,as a long value. Your function should not multip
Ilya [14]

Answer:

long power(int i)

{

   return pow(2,i);

}

Explanation:

The above written function is in C++.It does not uses loop.It's return type is long.It uses the function pow that is present in the math library of the c++.It takes two arguments return the result as first argument raised to the power of second.

for ex:-

pow(3,2);

It means 3^2 and it will return 9.

4 0
3 years ago
Que se trata el RUC<br>​
mariarad [96]
No se senor i no sure
7 0
2 years ago
What paper should I use for technical drawing?
Vitek1552 [10]

Answer:

classic A4 format, and therefore for 210 x 297 mm sheets

7 0
3 years ago
The range of an area where users can access the Internet via high frequency radio signals transmitting an Internet signal from a
Alexandra [31]
A) hotspot
Bluetooth is for short distance and pan is Personal area networks (PANs) connect an individual's personal devices
8 0
3 years ago
Read 2 more answers
Other questions:
  • These systems consist of interlinked knowledge resources, databases, human experts, and artificial knowledge agents that collect
    9·1 answer
  • Why is it important to ensure that dns servers have been secured before implementing an e-mail system? awr138?
    10·1 answer
  • Generate the requested sets using only set builder notation and the provided sets. Some problems may require you to build one or
    15·1 answer
  • Grooves and polished surfaces on desert pebbles are most likely caused by
    10·1 answer
  • Given a number count the total number of digits in a number
    12·1 answer
  • What are the process of boots up a computer?​
    15·2 answers
  • Examples of email use that could be considered unethical include _____.
    14·2 answers
  • Heyyyyyy who likes anime​
    12·2 answers
  • To obtain your class E learner license, youll need too _
    9·1 answer
  • Dyn is a cloud-based internet performance management company that provides DNS services for internet websites. It was attacked w
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!