0% found this document useful (0 votes)
2 views

Pages from !Pseudocode Guide-11

The document provides a guide on using the IF-THEN-ELSE pseudocode construct for evaluating multiple conditions. It explains the structure of the construct, where instructions are executed based on the evaluation of conditions. Examples illustrate how to implement the construct with specific conditions and corresponding actions.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Pages from !Pseudocode Guide-11

The document provides a guide on using the IF-THEN-ELSE pseudocode construct for evaluating multiple conditions. It explains the structure of the construct, where instructions are executed based on the evaluation of conditions. Examples illustrate how to implement the construct with specific conditions and corresponding actions.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

PSEUDOCODE CONSTRUCT GUIDE

IF – THEN ‐ ELSE (Multiple conditions)


IF condition THEN
Instructions
ELSE IF condition THEN
Instructions
END IF

Where:
condition is the condition to evaluate. Its answer will always be in the form of True or
False.

instructions are the pseudocode statements that will only be executed if the condition
evaluates to true. In simple words, these lines of code will only run if the condition’s answer is
True otherwise they will not run and computer will directly jump to line after END IF
statement

 Example
 IF weight < 20 THEN
PRINT “You are underweight”
ELSE IF weight < 35 THEN
PRINT “Your weight is normal
END IF

 IF chocolate = “Babli” THEN


count  count + 1
ELSE IF chocolate = “koko” THEN
count2  count + 2
END IF

12

You might also like