For the algorithm presented what will be displayed


1. For the algorithm presented below, what will be displayed in Line 9 given the following input in Line 2?

num1 = 4
num2 = 21
num3 = 14
num4 = 20

1 Prompt for num1, num2, num3, num4 
2 Get num1, num2, num3, num4 
3 Set index to 1 
4 DOWHILE index < 4 
5 IF num1 > num2 THEN 
Order_two_numbers (num1, num2) 
ENDIF 
6 IF num2 > num3 THEN 
Order_two_numbers (num2, num3) 
ENDIF 
7 IF num3 > num4 THEN 
Order_two_numbers (num3, num4) 
ENDIF 
8 add 1 to index
ENDDO 
9 Display num1, num2, num3, num4
END

Order_two_numbers (number1, number2) 
10 temp = number1 
11 number1 = number2 
12 number2 = temp
END

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: For the algorithm presented what will be displayed
Reference No:- TGS0139673

Expected delivery within 24 Hours