Answer
Try Again
Answer
Incorrect!
Choose one of the following
Answer
Incorrect!
Click Check Answer,
then click Next
Answer
Correct.
Well done!
Match the lines of code to create code to find the largest and smallest of three different numbers entered by a user.
if (y < smallest) then smallest = y
if (y > largest) then largest = y
if (z < smallest) then smallest = z
if (z > largest) then largest = z
largest = x
Print largest
Print smallest
smallest = x
user input x, y, z
#input the numbers as x, y and z
#set a variable called largest to the value of x
#set a variable called smallest to the value of x
#see if value y is larger, if it is change the variable
#see if z is larger than the current variable, if it is change it
#see if y is smaller than the current variable, if it is change it
#see if z is smaller than the current variable, if it is change it
#output largest
#output smallest