Create detailed Pseudocode for a program that calculates how

Create detailed Pseudocode for a program that calculates how many days are left until Christmas, when given as an input how many weeks are left Christmas. Use variable named weeks and days. Create detailed Pseudocode for a program that determines how many eggs a famer has collected on a given day when given as an input the number of 12-egg cartons he has packed. Use variable named eggs and cartons. Create detailed Pseudocode for a program that determines distance traveled when gven inputs of speed and time. Use variables named speed, time, and distance. Create detailed Pseudocode for a program that determines miles per gallon a vehicle gets when gives inputs of miles traveled and gallons of gas used. Use variables named miles, gallons, and milePerGallon. The East Coast sales division of a company generates 62 percent of total sales. Based on that percentage, write a detailed Pseudocode for a program that will predict how much the East Coast sales division will generate if the company has $4.6 million in sales this year. Display the result on the screen. Design a hierarchy chart (Flowchart) for question l-5.

Solution

1)

   void function main{
   declare int weeks;
   declare int days;
   declare const daysInWeek = 7;
   print \"Enter the number of weeks left for Christmas\";
   set weeks to input provided;
   calculate days = weeks X daysInWeek;
   print \"Days left until christmas: \"+days;
   }

2)

   void function main {
   declare int eggs;
   declare int cartons;
   declare const eggsInCarton = 12;
   print \"Enter the number of cartons\";
   set cartons to input provided;
   calculate eggs = cartons X eggsInCarton;
   print \"Number of eggs collected: \"+eggs;
   }

3)

   void function main {
   declare float distance;
   declare float speed;
   declare float time;
   print \"Enter the speed\";
   set speed to input provided;
   print \"Enter the time\";
   set time to input provided;
   calculate distance = speed X time;
   print \"Distance covered: \"+distance;
   }

4)

   void function main {
   declare float miles;
   declare float gallons;
   declare float milesPerGallon;
   print \"Enter the miles travelled\";
   set miles to input provided;
   print \"Enter the gallons of fuel consumed\";
   set gallons to input provided;
   calculate milesPerGallon = miles / gallons;
   print \"Miles travelled per gallon: \"+milesPerGallon;
   }

5)

   void function main{
   declare const ECSPercentOfSales = 62;
   declare float companySales;
   declare float revenueGenerated;
   set companySales to 4600000;
   calculate revenueGenerated = companySales X (ECSPercentOfSales / 100);
   print \"Revenue for ECS: \"+revenueGenerated;
   }

 Create detailed Pseudocode for a program that calculates how many days are left until Christmas, when given as an input how many weeks are left Christmas. Use
 Create detailed Pseudocode for a program that calculates how many days are left until Christmas, when given as an input how many weeks are left Christmas. Use

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site