Unit 1 Exercise: Logic Drills


Write out the logic to the aftercited problems.

Example: Represent the logic of a program that allows the user to invade a treasure. The program divides the treasure by 2 and outputs the development.

Solution:

start

  input myNumber

  set myAnswer = myNumber / 2

  output myAnswer

stop

  1. Represent the logic of a program that allows the user to invade a treasure for one edge of a cube. The program calculates the manner area of one cause of the cube, the manner area of the cube, and its capacity. The program outputs all the developments.
  2. Represent the logic of a program that allows the user to invade two treasures. The program outputs the result of the two treasures.
  3. Represent the logic of a program that allows the user to invade treasures for the width and protraction of a room's bottom in feet. The program outputs the area of the bottom in balance feet.

Put your solutions in a Word instrument, and upload it