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
Which features would work well for text entered into cells? Check all that apply.
yKpoI14uk [10]

Which features would work well for text entered into cells?

All the features given apply to text entered into a cell.

thesaurus , spelling , autosum , average , find , replace​

Explanation:

  • The tasks are referred to as basic tasks and include such operations as inserting and typing over, copying and moving items, finding and replacing text, undoing and redoing commands, checking spelling and grammar, using the thesaurus, and using formatting tools.
  • A thesaurus is used on a computer while writing an e-mail, letter, or paper to find an alternative meaning for words. For example, repeating the same word throughout your writing can become repetitive to a reader, and you could use a thesaurus to get a synonym of the word
  • Spelling is defined as the proper way to write a word, using the correct order of letters. This feature is provided by Excel for the cells.
  • AutoSum is a Microsoft Excel and other spreadsheet program function that adds together a range of cells and displays the total in the cell below the selected range.
  • The AVERAGE function calculates the average of numbers provided as arguments. To calculate the average, Excel adds the numbers together and divides by the total number of values supplied.
  • The
  • Microsoft Excel FIND function returns the location of a substring in a string. The search is case-sensitive. The FIND function is a built-in function in Excel that is categorized as a String/Text Function.
  • The Microsoft Excel REPLACE function replaces a sequence of characters in a string with another set of characters. The REPLACE function is a built-in function in Excel that is categorized as a String/Text Function. It can be used as a worksheet function (WS) in Excel.
4 0
3 years ago
Read 2 more answers
HELPPPP KOKICHI IS OUT TO KILL ME
Ne4ueva [31]
Oh my- good luck with that-
3 0
3 years ago
Explain briefly how learning how to follow can make a person a good leader
Masja [62]

By  learning how to follow, one can  be a good leader because: Looking up to a leader and following them help to:

  • Keep one's ego in check and one can be able to be a good ego manager.
  • They create strong credibility.
  • They help use to focus our efforts for maximum impact.

<h3>How does being a good follower make you a good leader?</h3>

As a good follower, a person can be able to have the boldness and confidence to be able to respectfully talk about a lot of things with their leader if you see that you're not going in the right way.

Note that  one can trust your leader and this will boast up the spirit of your input and engagement in all.

Hence, By  learning how to follow, one can  be a good leader because: Looking up to a leader and following them help to:

  • Keep one's ego in check and one can be able to be a good ego manager.
  • They create strong credibility.
  • They help use to focus our efforts for maximum impact.

Learn more about good leader from

brainly.com/question/12522775

#SPJ1

3 0
1 year ago
John’s grandparents make wine for special occasions. They add a pinch of yeast to crushed grapes. Over time, this action release
luda_lava [24]
The answer is 1. A<span>lcoholic Fermentation

Hope that helped :)</span>
4 0
3 years ago
Read 2 more answers
What is output?
Alex777 [14]

Answer:

The output of this question is 21. As show in the image

The explanation is given in below

Explanation:

Let first write the question

C=1

sum = 0

while(C<10):

C=C+3

sum=sum + C

print(sum)

Now Focus on

while(C<10):

C=C+3

sum=sum + C

The value of C is initially 1

C=1+3

Sum= 0+4

In second loop the value of C will become 4

c=4+3

sum=4+7

In third loop the value of C will be 7

c=7+3

sum=11+10

so the answer is 11+10=21

7 0
3 years ago
Other questions:
  • Charlie is taking his slide presentation to a meeting at a remote location. He saves his presentation as a package on a CD. Char
    15·2 answers
  • In regard to protective actions for explosive devices, the area where the blast originates is referred to as ___________ perimet
    8·1 answer
  • What is the difference between a key escrow and a recovery agent? (Choose all that apply.)
    12·1 answer
  • If the variable letter has been defined as a char variable, which of the following are not valid assignment statements to assign
    8·1 answer
  • Discuss whether the redundant data should be addressed prior to beginning the wireless network architecture project, in coordina
    11·1 answer
  • the default name for the small icon that represents a web site or page, and is displayed in the browsers, typically at the begin
    9·1 answer
  • A _____ refers to a product or service, such as a technical report, a training session, a piece of hardware, or a segment of sof
    12·2 answers
  • Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMile
    10·1 answer
  • ! (( i &gt; ( f + 1)) es verdadero o falso segun la logica de programación.
    14·1 answer
  • By the mid-1990s, how did revenue generated from video games compare to revenue generated from movies?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!