Question

In: Computer Science

Can someone write me, in pseudocode, and it doesn't have to be modular, actually, I prefer...

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

Solutions

Expert Solution

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:-


Related Solutions

I have to complete a template for pathophysiology , can someone tell me the pathophysiology of...
I have to complete a template for pathophysiology , can someone tell me the pathophysiology of pain. This is for a pathophysiology class
Can someone please tell me on how can I have a double and character as one...
Can someone please tell me on how can I have a double and character as one of the items on my list? Thanks! This is what I got so far and the values I am getting are all integers. #pragma once #include <iostream> class Node { public:    int data;    Node* next;       // self-referential    Node()    {        data = 0;        next = nullptr;    }    Node(int value)    {        data...
Can someone answer it for me and may i have the reference in apa format? thank...
Can someone answer it for me and may i have the reference in apa format? thank you in advance! 1. What is cholesterol's mechanism of absorption, synthesis, esterification, and metabolism? 2.Does the low-cholesterol diet translate to a lower risk of CHD? 3. Why is there a need to esterify cholesterols? 4. How does fatty acid contribute to the generation of energy via beta-oxidation process. 5Why is there a presence of ketones in uncontrolled type 1 DM? Why is it absent...
Can someone please explain the following program to me? I have ran it, but do not...
Can someone please explain the following program to me? I have ran it, but do not understand how the answers are being derived. #include<iostream> using namespace std; int num1 = 1; int quiz(int num) { static int n1 = 10; int n2 = 20; n1--; n2++; num1++; if (num == 1) return num1; else if (num < 3) return n1; else return n2; } // quiz main() { cout << quiz(num1) << endl; cout << quiz(num1) << endl; cout <<...
can someone make me a shopping cart for me ? i need to make a shopping...
can someone make me a shopping cart for me ? i need to make a shopping cart ,but i have no idea about how to do this i have made 3 line of items , this is one of the pruduct line line 1 ------------------------------------- <!DOCTYPE html> <html lang="en"> <head> <style> .div1 { border: 2px outset red; background-color: lightblue; text-align: center; } </style> </head> <!-- body --> <body style="background-color:silver; "class="main-layout position_head"> <!-- loader --> </li> </ul> </section> </nav> </section> </header>...
CAN SOMEONE WRITE THIS PAPER FOR ME PLEASE, I DON'T KNOW HOW TO DRIVE RECOMMENDATION REPORT,...
CAN SOMEONE WRITE THIS PAPER FOR ME PLEASE, I DON'T KNOW HOW TO DRIVE RECOMMENDATION REPORT, PLEASE HELP ME !!!!!! RECOMMENDATION REPORT ON HONDA ACCORD ( WORD 250)
Can someone please assist me with this question. The information that I found was not of...
Can someone please assist me with this question. The information that I found was not of help. Discuss how using systems thinking will influence your decision-making. I have to do a full paragraph on this question.
Can someone please explain the edgeworth box to me by typing in a way i can...
Can someone please explain the edgeworth box to me by typing in a way i can see and understand? what determines the contract curves path?
I need someone to clarify one confusion to me , its regarding operations management. can someone...
I need someone to clarify one confusion to me , its regarding operations management. can someone explain the 3 strategies in aggregate capacity management in alot of details ( like 500 words) so I can understand about it more. the three strategies are (level, hybrid, and chase)
can someone tell me if i am wrong on any of these???? THANKS In order to...
can someone tell me if i am wrong on any of these???? THANKS In order to be able to deliver an effective persuasive speech, you need to be able to detect fallacies in your own as well as others’ speeches. The following statements of reasoning are all examples of the following fallacies: Hasty generalization, mistaken cause, invalid analogy, red herring, Ad hominem, false dilemma, bandwagon or slippery slope. 1. __________bandwagon fallacy_______ I don’t see any reason to wear a helmet...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT