SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Walter Savitch ,julia Lobur
Chapter:
Introduction To Computers And C++ Programming
Exercise:
Self-test Exercises
Question:12 | ISBN:9780321531346 | Edition: 7

Question

An algorithm is approximately the same thing as a recipe, but some kinds

of steps that would be allowed in a recipe are not allowed in an algorithm.

Which steps in the following recipe would be allowed in an algorithm?

Place 2 teaspoons of sugar in mixing bowl.

Add 1 egg to mixing bowl.

Add 1 cup of milk to mixing bowl.

Add 1 ounce of rum, if you are not driving.

Add vanilla extract to taste.

Beat until smooth.

Pour into a pretty glass.

Sprinkle with nutmeg.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

The following recipe would be allowed in the given algorithm:

  • Add vanilla extract to taste.
  • Beat until smooth.
  • Pour into a pretty glass.
  • Sprinkle with nutmeg.
0 0

Discussions

Post the discussion to improve the above solution.