Well done!
You have completed Introduction to Pseudocode Quiz!
Quiz Question 1 of 5
You are writing pseudocode to find the maximum of three numbers. Which of the following pseudocode snippets best represents the decision-making process to accomplish this task?
Choose the correct answer below:
-
A
Start Program PROMPT the user to enter num1, num2, and num3 STORE the values in variables num1, num2, num3 IF num1 > num2 THEN IF num1 > num3 THEN PRINT "num1 is the largest" ELSE PRINT "num3 is the largest" END IF ELSE IF num2 > num3 THEN PRINT "num2 is the largest" ELSE PRINT "num3 is the largest" END IF End Program
-
B
Start Program IF num1 > num2 THEN PRINT "num1 is the largest" ELSE PRINT "num2 is the largest" END IF IF num3 > num1 THEN PRINT "num3 is the largest" End Program
-
C
Start Program IF num1 > num2 AND num1 > num3 THEN PRINT "num1 is the largest" ELSE IF num2 > num1 AND num2 > num3 THEN PRINT "num2 is the largest" ELSE PRINT "num3 is the largest" End Program
-
D
Start Program PROMPT the user to enter num1, num2, and num3 STORE the values in variables num1, num2, num3 PRINT "The largest number is " + max(num1, num2, num3) End Program