99.6k views
5 votes
The following algorithm accepts 3 integer values from the user, and then prints the maximum value entered. Some lines are missing.

Complete the program by inserting instructions after Line 4
1. OUTPUT (“Please enter 3 values. “)
2. Input (x, y, z)
3. MaxValue  x
4. IF y > MaxValue THEN
MaxValue  y

User Lbt
by
4.5k points

1 Answer

5 votes

Answer:

1. OUTPUT (“Please enter 3 values. “)

2. Input (x, y, z)

3. MaxValue = x

4. IF y > MaxValue THEN

5. MaxValue = y

6. IF z > MaxValue THEN

7. MaxValue = z

8. OUTPUT("Maximum value is: ", MaxValue)

User Mollo
by
4.4k points