In: Computer Science
Can someone write me, in pseudocode, and it doesn't have to be modular, actually, I prefer it not to be modular, for the following question below:
If a moderately active person cuts their calorie intake by 500 calories a day, he or she can typically lose about 4 pounds a month. Write a program that has the user enter their starting weight and then 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
The pseudocode of the given problem is as follows:-
Start
print "Enter your weight(in pounds)"
input weight;
print "If you cut your calorie intake by 500 calories a day,"
print "then you can lose about 4 pounds per month"
print "Hence your expected weight chart in next 6 months will
be:"
print "Month Weight"
print "0 "+weight
for i=1 to 6
weight=weight-4
print i+" "+weight
end-for
Stop
The implementation of the above pseudocode in C++ is as follows:-