- (Practice) Determine a step-by-step procedure (list the steps) for each of the following tasks:
Note: There’s no single correct answer for each task. This exercise is designed to give you practice in
converting heuristic commands into equivalent algorithms and understanding the differences between
the thought processes involved.
3The source code you enter is manipulated and stored as ASCII text (see Section 2.1), so if you’re using a commercial word-processing
program, you must save source code files in text format.
12 Getting Started
a. Fix a flat tire.
b. Make a phone call.
c. Go to the store and purchase a loaf of bread.
d. Roast a turkey.
- (Practice) Determine and write an algorithm (list the steps) to interchange the contents of
two cups of liquid. Assume that a third cup is available to hold the contents of either cup temporarily.
Each cup should be rinsed before any new liquid is poured into it.
- (Practice) Write a detailed set of instructions in English to calculate the dollar amount of
money in a piggybank that contains h half-dollars, q quarters, n nickels, d dimes, and p pennies.
- (Practice) Write a set of detailed, step-by-step instructions in English to find the smallest
number in a group of three integer numbers.
All 3 RepliesReply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.