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

Pages from !Pseudocode Guide-12

The document explains decision making in pseudocode, specifically focusing on the constructs CASE-OF and IF-THEN. It details the IF-THEN construct, highlighting its two variations for checking single and multiple conditions, along with syntax examples. The instructions within the IF-THEN construct are executed only if the evaluated condition is true.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Pages from !Pseudocode Guide-12

The document explains decision making in pseudocode, specifically focusing on the constructs CASE-OF and IF-THEN. It details the IF-THEN construct, highlighting its two variations for checking single and multiple conditions, along with syntax examples. The instructions within the IF-THEN construct are executed only if the evaluated condition is true.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

PSEUDOCODE CONSTRUCT GUIDE

5. DECISION MAKING
Decision making or branching is a way to direct the flow of pseudocode depending upon a particular
condition. We can use these constructs to check for a condition and depending upon the result either
do something or not.
There are 2 constructs for decision making in pseudocode; CASE‐OF and IF‐THEN.
IF‐THEN have 2 variations; one which checks single condition and the other which can check against a
series of conditions. Both have slight differences in their syntax and are explained below.
IF – THEN (Single condition)
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”
END IF

 IF chocolate = “Babli” THEN


count  count + 1
END IF

11

You might also like