Problem

Determine which characteristics of an algorithm described in the text (after Algorithm 1)...

Determine which characteristics of an algorithm described in the text (after Algorithm 1) the following procedures have and which they lack.

a)      procedure double(n: positive integer)

while n > 0

n := 2n


b)    procedure divide(n : positive integer)

while n > 0

m := 1/n.

n := n 1


c)     procedure sum(n: positive integer)

sum := 0

while i<10

sum := sum – i


d)    procedure choose(a, b: integers).

x := either a or b

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search