Question 6) Thrown for a Loop.
What is the exact output of the following pseudocode program?
BEGIN MAIN
CREATE num1 ←15
CREATE num2 ← 30
FOR each I from 1 to 4 by 1
IF (num1 == num2) THEN
PRINT(“lime” +
”\t”)
ENDIF
PRINT("lemon” + “\t”)
num1 ←num1 * 2
PRINTLINE("apple” + “\t”)
END FOR
PRINTLINE(“orange”)
END MAIN
Output=
Question 5) Order Up!Each operator below has a box under it. Fill in the order of how the following expressions are evaluated by the computer as an Integer, as well as the solution for the equation. (15 points)
Part 1: ( ( 8 / 3) - 1) * (6 + 3) - 4 Solution
Part 2: 3 * 6 - 5 / 3 Solution
Order:
1) 8/3
2)(2-1)
3)(6+3)
4)1*9
5)9-4
Part 2 order:
1)3*6
2)5/3
3)18-1
Get Answers For Free
Most questions answered within 1 hours.