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
harina [27]
3 years ago
5

Project 8:The Harris-Benedict equation estimates the number of calories your body needs to maintain your weight if you do no exe

rcise. This is called your basal metabolic rate, or BMR.The calories needed for a woman to maintain her weight is:BMR = 655 + (4.3 Ã weight in pounds) + (4.7 Ã height in inches) â (4.7Ã age in years)The calories needed for a man to maintain his weight is:BMR = 66 + (6.3 Ã weight in pounds) + (12.9 Ã height in inches) â (6.8 Ã age in years)A typical chocolate bar will contain around 230 calories. Write a program that allows the user to input his or her weight in pounds, height in inches, and age in years. The program should then output the number of chocolate bars that should be consumed to maintain oneâs weight for both a woman and a man of the input weight, height, and age.
Repeat the calorie-counting program described in Programming Project 8 from Chapter 2. This time ask the user to input the string "M" if the user is a man and "W" if the user is a woman. Use only the male formula to calculate calories if "M" is entered and use only the female formula to calculate calories if "W" is entered. Output the number of chocolate bars to consume as before.

Engineering
1 answer:
lilavasa [31]3 years ago
4 0

Answer:

See explaination and attachment for the program code and output

Explanation:

#include <iostream>

using namespace std;

int main()

{

char gender; //details for gender and checking

char ans;

do

{

cout<<"Gender (M or F): ";

cin>>gender;

switch(gender)

{

case 'M':

//cout<<"Male."<<endl;

break;

case 'F':

//cout<<"Female."<<endl;

break;

default:

cout<<"Wrong Gender. Please enter again (M or F): ";

cin>>gender;

}

int Weight,Height,Age; //declaration of variables

double bmr;

cout<<"Weight: ";

cin>>Weight;

cout<<"Height (in inches): ";

cin>>Height;

cout<<"Age: ";

cin>>Age;

//bmr calculations for male and female

if (gender = 'M')

{

bmr = 66 + (6.3 * Weight) + (12.9 * Height) - (6.8 * Age);

cout<<"He needs "<<bmr<<" to maintain his weight."<<endl;

cout<<"He needs to eat "<<(bmr/230)<< " candy bars in one day."<<endl;

}

else if (gender = 'F')

{

bmr = 655 + (4.3 * Weight) + (4.7 * Height) - (4.7 *Age);

cout<<"She needs "<<bmr<<" to maintain her weight"<<endl;

cout<<"She needs to eat "<<(bmr/230)<< " candy bars in one day."<<endl;

}

cout<< "Do you want to do another one>continue (Y/N): ";

cin >> ans;

}while(ans=='y'||ans=='Y');

cout<<"\n Thanks for using my BMR calculator. Good Bye!.";

return 0;

}

Kindly check attachment for output.

You might be interested in
Compare a series circuit powered by six 1.5-volt batteries to a series circuit powered by a single 9-volt battery. Make sure the
lana [24]

Answer:

Both series circuits provide a total voltage of 9 volts to the two bulbs connected in series and the voltage will be equally divided among two bulbs and they will have same brightness. Therefore, both circuits will have same characteristics.

Explanation:

We are asked to compare two series circuits having equal number of light bulbs.

1st circuit is powered by 6 batteries each having a voltage of 1.5V

2nd circuit is powered by a single battery having a voltage of 9V.

The six batteries in the 1st circuit can be connected together in series or in parallel.

When the batteries are connected in series (positive terminal of one battery connected to negative terminal of another battery) their voltage gets added which means

Voltage of pack = number of batteries*voltage of each battery

Voltage of pack = 6*1.5

Voltage of pack = 9 volts

But the current remains same in the series connection since there is only path for the current to flow.

On the other hand, when the batteries are connected in parallel, the voltage remains same but the current increases.

Circuit 1:

In this circuit, we have 6 batteries each of 1.5 volts connected in series to provide a voltage of 9 volts.

We have connected 2 bulbs in this series circuit.

The voltage will be equally divided between two bulbs if both bulbs are identical in construction.

So there will be 4.5 volts across each bulb and both bulbs will have same brightness.

Circuit 2:

In this circuit, we have 1 battery which provide a voltage of 9 volts.

We have connected 2 bulbs in this series circuit just like in circuit 1.

The voltage will be equally divided between two bulbs if both bulbs are identical in construction.

So there will be 4.5 volts across each bulb and both bulbs will have same brightness.

Conclusion:

Both series circuits provide a total voltage of 9 volts to the two bulbs connected in series and the voltage will be equally divided among two bulbs and they will have same brightness. Therefore, both circuits will have same characteristics.

3 0
3 years ago
What is the composition of the two phases that form when a stream of 40% A, 39% B, and 21% C separates into two phases? Label th
irga5000 [103]

Answer:

vapor fraction = 0.4 and 0.08

Explanation:

At reasonably high temperatures, a mixture will exist in the form of a sub cooled liquid. Between these extremes, the mixture exists in a two phrase region where it is a vapor liquid equilibrium. From a vapor-liquid phase diagram, a mixture of 40% A, 39% B, and 21% C separates to give the vapor compositions of 0.4 and 0.08.

8 0
3 years ago
what is an example of an innovative solution to an engineering problem? Explain briefly why you chose this answer.
Leviafan [203]

Answer:

robotic technology    

Explanation:

Innovation is nothing but the use of various things such as ideas, products, people to build up a solution for the benefit of the human. It can be any product or any solution which is new and can solve people's problems.

Innovation solution makes use of technology to provide and dispatch new solutions or services which is a combination of both technology and ideas.

One such example of an innovative solution we can see is the use of "Robots" in medical science or in any military operations or rescue operation.

Sometimes it is difficult for humans to do everything or go to everywhere. Thus scientist and engineers have developed many advance robots or machines using new ideas and technology to find solutions to these problems.

Using innovations and technologies, one can find solutions to many problems which is difficult for the peoples. Robots can be used in any surveillance operation or in places of radioactive surrounding where there is a danger of humans to get exposed to such threats. They are also used in medical sciences to operate and support the patient.  

3 0
3 years ago
A pinion and gear pair is used to transmit a power of 5000 W. The teeth numbers of pinion
tester [92]

Answer:

mark me as a brainleast

Explanation:

209781

6 0
2 years ago
Water vapor at 10bar, 360°C enters a turbine operatingat steady state with a volumetric flow rate of 0.8m3/s and expandsadiabati
Artyom0805 [142]

Answer:

A) W' = 178.568 KW

B) ΔS = 2.6367 KW/k

C) η = 0.3

Explanation:

We are given;

Temperature at state 1;T1 = 360 °C

Temperature at state 2;T2 = 160 °C

Pressure at state 1;P1 = 10 bar

Pressure at State 2;P2 = 1 bar

Volumetric flow rate;V' = 0.8 m³/s

A) From table A-6 attached and by interpolation at temperature of 360°C and Pressure of 10 bar, we have;

Specific volume;v1 = 0.287322 m³/kg

Mass flow rate of water vapour at turbine is defined by the formula;

m' = V'/v1

So; m' = 0.8/0.287322

m' = 2.784 kg/s

Now, From table A-6 attached and by interpolation at state 1 with temperature of 360°C and Pressure of 10 bar, we have;

Specific enthalpy;h1 = 3179.46 KJ/kg

Now, From table A-6 attached and by interpolation at state 2 with temperature of 160°C and Pressure of 1 bar, we have;

Specific enthalpy;h2 = 3115.32 KJ/kg

Now, since stray heat transfer is neglected at turbine, we have;

-W' = m'[(h2 - h1) + ((V2)² - (V1)²)/2 + g(z2 - z1)]

Potential and kinetic energy can be neglected and so we have;

-W' = m'(h2 - h1)

Plugging in relevant values, the work of the turbine is;

W' = -2.784(3115.32 - 3179.46)

W' = 178.568 KW

B) Still From table A-6 attached and by interpolation at state 1 with temperature of 360°C and Pressure of 10 bar, we have;

Specific entropy: s1 = 7.3357 KJ/Kg.k

Still from table A-6 attached and by interpolation at state 2 with temperature of 160°C and Pressure of 1 bar, we have;

Specific entropy; s2 = 8.2828 KJ/kg.k

The amount of entropy produced is defined by;

ΔS = m'(s2 - s1)

ΔS = 2.784(8.2828 - 7.3357)

ΔS = 2.6367 KW/k

C) Still from table A-6 attached and by interpolation at state 2 with s2 = s2s = 8.2828 KJ/kg.k and Pressure of 1 bar, we have;

h2s = 2966.14 KJ/Kg

Energy equation for turbine at ideal process is defined as;

Q' - W' = m'[(h2 - h1) + ((V2)² - (V1)²)/2 + g(z2 - z1)]

Again, Potential and kinetic energy can be neglected and so we have;

-W' = m'(h2s - h1)

W' = -2.784(2966.14 - 3179.46)

W' = 593.88 KW

the isentropic turbine efficiency is defined as;

η = W_actual/W_ideal

η = 178.568/593.88 = 0.3

8 0
3 years ago
Other questions:
  • Which of the following is the correct definition of mechanical energy?
    9·2 answers
  • 4. A 1 m3 rigid tank has propane at 100 kPa, 300 K and connected by a valve to another tank of 0.5 M3 with propane at 250 kPa, 4
    11·1 answer
  • A thick oak wall (rho = 545 kg/m3 , Cp = 2385 J/kgK, and k = 0.17 W/mK) initially at 25°C is suddenly exposed to combustion prod
    11·1 answer
  • Consider a very long, cylindrical fin. The temperature of the fin at the tip and base are 25 °C and 50 °C, respectively. The dia
    14·1 answer
  • Help me, iv been having problems with ads going in my phones storage files, what can i do to stop this?
    14·2 answers
  • Choose the three questions that an engineer should ask himself or herself when identifying the need of a problem.
    6·2 answers
  • Omg I just got 17/25 questions wrong using this on an Ag test , but got 100’s every time on health
    6·2 answers
  • ANSWER ASAP<br> What is the point system?<br> this is for driving
    8·1 answer
  • What is digital communication?​
    6·1 answer
  • Use the map to answer the question.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!