The document provides examples of programs that perform calculations based on user input values and outputs the results. It asks to represent the logic of 4 programs: 1) calculates surface area and volume of a cube given an edge length, 2) outputs the product of two user-entered values, 3) calculates the area of a room given width and length dimensions. The solutions are to be written out step-by-step and uploaded in a Word document.
Write out the logic to the following problems.Example Repre.docx
1. Write out the logic to the following problems.
Example: Represent the logic of a program that allows the user
to enter a value. The program divides the value by 2 and outputs
the result.
Solution
:
start
input myNumber
set myAnswer = myNumber / 2
output myAnswer
stop
Represent the logic of a program that allows the user to enter a
2. value for one edge of a cube. The program calculates the
surface area of one side of the cube, the surface area of the
cube, and its volume. The program outputs all the results.
Represent the logic of a program that allows the user to enter
two values. The program outputs the product of the two values.
Represent the logic of a program that allows the user to enter
values for the width and length of a room's floor in feet. The
program outputs the area of the floor in square feet.
Put your solutions in a Word document, and upload it