Question

Using the Metabolic Equivalent of Task value for a given activity, the number of calories burned...

Using the Metabolic Equivalent of Task value for a given activity, the number of calories burned per hour can be calculated. The formula is a person’s weight in pounds divided by 2.2 and multiplied by the MET value for the given activity. Write a program to input the MET value and out put the number of calories burned per hour for a person for each pound between 120 and 190 inclusive. The sample output is for the cycling MET which is 8.0.

Write main() and no other functions. Output formatted as shown (actual width of columns not important as long as the decimal points are lined up and there is one point to right of decimal point for real numbers.

Enter MET for activity: 8.0
 Weight  Calories burned
   120     436.4
   121     440.0
   122     443.6
   123     447.3
   124     450.9
   125     454.5
   126     458.2
   127     461.8
   . . .
   186     676.4
   187     680.0
   188     683.6
   189     687.3
   190     690.9
 Press any key to continue 
0 0
Add a comment Improve this question Transcribed image text
Answer #1

A C code is written for the above-mentioned problem.

Code:

#include <stdio.h>

int main()
{
float MET;
int i;
float CaloriesBurned;
printf("Enter MET for activity: ");
scanf("%f",&MET);
  
printf(" Weight Calories burned\n");
for(i=120;i<=190;i++){
CaloriesBurned = (i/2.2)*MET;
printf("%d %.1f\n",i,CaloriesBurned);
}
return 0;
}

The screenshot of the full working code with output is attached.

X Compare Sort.javax ova * Number.c Numberce • . Graph.java Craph.java • . Test.html X DiceRoll.ja Test.cpp #include <stdio.hEnter MET for activity: 8.0 Weight calories burned 120 436.4 121 440.0 122 443.6 123 447.3 124 450.9 125 454.5 126 458.2 127157 570.9 158 574.5 159 578.2 160 581.8 161 585.5 162 589.1 163 592.7 164 596.4 165 600.0 166 603.6 167 607.3 168 610.9 169 6

Add a comment
Know the answer?
Add Answer to:
Using the Metabolic Equivalent of Task value for a given activity, the number of calories burned...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can anyone help me with this nutrition homework? How many Calories did Bobby consume (note that...

    Can anyone help me with this nutrition homework? How many Calories did Bobby consume (note that digestible carbohydrate includes sugar grams)? A. 2030 B. 2550 C. 2887 D. 2982 E. 3525 Based upon Bobby's Calorie intake, Bobby's Dietary Reference Intake (DRI) for fiber is _____ grams. A. 25 B. 38 C. 40.4 D. 42 E. 54.5 Bobby consumed _____ percent of his Calories from sugar, and _____ the AMDR. 4.4, met 10,met 13,met 26, did not meet 32,didnotmeet Bobby consumed...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT