Essentials
primer-original-v2mediumEssentialsSoftware Fundamentalsprimer-original-v2

From the option, find the correct pseudo-code to find the greatest of three numbers

Answer options

A
BEGIN DECLARE variables a,b,c READ a,b,c IF a>b IF a>c PRINT “a” ELSE PRINT “c” ELSE IF b>c PRINT “b” ELSE PRINT “c” END
B
Incorrect pseudocode with wrong initialization/order
C
Incorrect pseudocode with missing loop or condition
D
Incorrect pseudocode with wrong output statement

Correct answer: BEGIN DECLARE variables a,b,c READ a,b,c IF a>b IF a>c PRINT “a” ELSE PRINT “c” ELSE IF b>c PRINT “b” ELSE PRINT “c” END

Explanation

Quick AnswerThe correct answer is BEGIN DECLARE variables a,b,c READ a,b,c IF a>b IF a>c PRINT “a” ELSE PRINT “c” ELSE IF b>c PRINT “b” ELSE PRINT “c” END because it directly addresses the core logic of Essentials.

This question has been retained as-is due to its unique context.

Related Essentials questions

Practice more Essentials questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.