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 take a look and tell me what I have wrong here. VS 2019 .net...
Can someone take a look and tell me what I have wrong here. VS 2019 .net framework console app c## using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; namespace dropbox10 { class MainClass { public static void Main(string[] args) { //create a list of employees List<Employee> allEmployees = new List<Employee>(); //create two full time employees FullTimeEmployee fe1 = new FullTimeEmployee("111", "Alice", 67888.00m); FullTimeEmployee fe2 = new FullTimeEmployee("222", "Bob", 67555.00m); //create two part time employees PartTimeEmployee pe1...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT