# Programming

3022 Words Nov 20th, 2012 13 Pages
Programming

Programming Logic and Design, 6th Edition

Chapter 3

Exercises

1. In Figure 3-10 the process of buying and planting flowers in the spring was shown using the same structures as the generic example in Figure 3-9. Describe some other process with which you are familiar using exactly the same logic.

Answer: Student answers will vary widely. They should come up with processes that fit the generic logic shown in Figure 3-9. Some examples could include: making a dentist appointment or registering for a class. Pseudocode for each follows.

if it’s time for your annual teeth cleaning call the dentist for an appointment tomorrow while the day and time you want isn’t available if another time the same day is
…show more content…
a two-inch by one-inch rectangle

Pseudocode: start lower the pen to a piece of paper move one inch along a straight line move one inch along a straight line turn 90 degrees to the right move one inch along a straight line turn 90 degrees to the right move one inch along a straight line move one inch along a straight line turn 90 degrees to the right move one inch along a straight line raise the pen from the paper stop

or

start do A do C do C do D do C do D do C do C do D do C do B stop

Flowchart: [pic]

c. a string of three beads

Pseudocode: start lower the pen to a piece of paper draw a circle that is one-inch in