Question

Weight Loss If moderately active persons cut their calorie intake by 500 calories a day, they...

Weight Loss

If moderately active persons cut their calorie intake by 500 calories a day, they can typically lose about 4 pounds a month. Write a program that has the users enter their starting weight and then creates and displays a table showing what their expected weight will be at the end of each month for the next 6 months if they stay on this diet.

Note the answer should be in assembly language using windows 32 and .586

Homework Answers

Answer #1

#include

#include

#include

using namespace std;

int main()

{

double w,m=1;

cout<<"Please enter your weight (pounds): ";

cin>>w;

cout<<"Number of calories decrease by person:

500"<<endl;

cout<<"Number of pound reduce by person at the end of

each month: 4"<<endl;

cout<<" Month (end)"<<" Weight"<<endl;

while(m<=6)

{

w=w-4;

if(w<0)

{

cout<<"Weight cannot be reduced";

further"<<endl;

break;

}

cout<<setprecision(5);

cout<<setw(8)<<m<<" "<<w<<endl;

m++;

}

system("pause");

return 0;

}

Expected Weight-

Output

Please enter your weight (pounds): 80

Number of calories decrease by person: 500

Number of pound reduce by person at the end of each month: 2

Month (end) Weight

1. 78

2. 76

3. 74

4. 72

5. 70

6. 68

Press any key to continue . . .

Know the answer?
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
Similar Questions