Table of Contents

    Decision Making in Flowcharts

    Decision Making in Flowcharts
    Figure: Decision Making in Flowcharts

    FLOWCHART FUNDAMENTALS

    Decision Making in Flowcharts

    Decision Making allows a flowchart to choose different paths based on conditions. It is one of the most important concepts in flowcharts and programming — enabling logic, branching, and intelligent behavior in every computer program and real-life process.

    What is Decision Making?

    Decision Making in flowcharts is used to evaluate a condition and choose the correct path based on the result. It allows a flowchart to branch out into multiple paths depending on whether the condition is True (Yes) or False (No).

    Decision making is represented by a diamond (♦) shape, known as the Decision Symbol. Every "if" statement in programming is fundamentally based on this concept.

    Key Idea: Decision structures allow a flowchart to think and act based on conditions — making it powerful and useful for any problem.

    Real-Life Analogy

    Decision making is like standing at a crossroad. Based on where you want to go (the condition), you choose to go left or right. Every time you make a choice in daily life — like "Should I take an umbrella?" — you're using decision-making logic.

    Decision Symbol

    The diamond shape (♦) is used to represent a decision in a flowchart. It contains a condition that returns one of two or more possible outcomes.

    The Diamond Symbol

    Represents a decision point

    The diamond shape is used to check a condition. It has two or more possible outcomes, usually labeled as Yes/No or True/False. Each outcome leads to a different path in the flowchart.

    Example "Is age >= 18?" → Yes: Allow voting → No: Deny voting.

    Conditions in Decisions

    Every decision in a flowchart is based on a condition. The condition is a logical expression that evaluates to either True or False.

    Rules for Conditions

    • Conditions are written inside the decision symbol.
    • Common results are: Yes / No or True / False.
    • If the condition is True (Yes), the flow goes one way.
    • If the condition is False (No), the flow goes another way.
    • Conditions should be clear, simple, and testable.
    • Every path from the decision must be labeled clearly.

    Types of Decision Structures

    There are three main types of decision structures used in flowcharts. Each type is used depending on how many conditions need to be evaluated.

    1. Simple Decision (Single Condition)

    1

    Simple Decision

    One condition with two outcomes

    A Simple Decision uses one condition with two outcomes: True (Yes) or False (No). Based on the result, the flow takes one of the two paths.

    Start
       ↓
    Is condition True?
       ├── Yes → Execute Statement A
       └── No  → Execute Statement B
       ↓
    Stop
    Example "Is age >= 18?" → Yes: "You can vote" → No: "You cannot vote".

    2. If – Else If – Else (Multiple Conditions)

    2

    If – Else If – Else

    Used when there are more than two conditions

    An If – Else If – Else structure checks multiple conditions one after another. If none of the conditions are true, a default statement is executed for all other cases.

    Start
       ↓
    Is Condition 1 True?
       ├── Yes → Statement 1
       └── No  → Is Condition 2 True?
                 ├── Yes → Statement 2
                 └── No  → Statement for All Other Cases
       ↓
    Stop
    Example Marks >= 90 → Grade A · Marks >= 75 → Grade B · Marks >= 60 → Grade C · Else → Fail.

    3. Nested Decision (Decision Inside Another Decision)

    3

    Nested Decision

    A decision made inside another decision

    A Nested Decision structure has a decision inside another decision. It is used when checking one condition depends on the result of another condition.

    Start
       ↓
    Is Condition 1 True?
       ├── Yes → Is Condition 2 True?
       │          ├── Yes → Statement 1
       │          └── No  → Statement 2
       └── No → Statement 3
       ↓
    Stop
    Example Is user logged in? → Yes: Is admin? → Yes: Show admin panel · No: Show user panel · Outer No: Show login screen.

    Example — Find the Largest of Two Numbers

    Let's understand decision making with a classic example that finds the largest of two numbers using a flowchart.

    Algorithm (Step-by-Step)

    Step 1: Start
    Step 2: Read two numbers A and B
    Step 3: If A > B, then
            Print "A is Largest"
            Else
            Print "B is Largest"
    Step 4: Stop

    Flowchart Representation

    Start
       ↓
    Input two numbers A and B
       ↓
    Is A > B?
       ├── Yes → Print "A is Largest"
       └── No  → Print "B is Largest"
       ↓
    Stop
    Explanation The flowchart uses a simple decision (Is A > B?) to determine which number is the largest, then prints the result.

    Decision Results

    Condition Result Flow Path
    True / Yes Condition is satisfied Flow goes through the Yes path
    False / No Condition is not satisfied Flow goes through the No path

    Why Decision Making is Important

    Decision making is what makes a flowchart or program truly useful. Without it, programs would only be able to follow a fixed sequence with no ability to adapt.

    Key Benefits

    • Helps in choosing the correct action
    • Makes the flowchart dynamic and intelligent
    • Essential for real-life problem solving
    • Used in loops, validations, and comparisons
    • Enables branching logic
    • Supports interactive decision-based programs

    Real-World Uses

    • ATM PIN verification
    • Login authentication
    • Traffic signal control
    • Online form validation
    • E-commerce checkout flow
    • Game logic and AI

    Common Comparison Operators

    Conditions in decision boxes use comparison operators to compare values. Here are the most commonly used operators.

    Operator Meaning Example
    == Equal to A == B
    != Not equal to A != B
    > Greater than A > B
    < Less than A < B
    >= Greater than or equal to A >= B
    <= Less than or equal to A <= B

    Logical Operators in Decisions

    Sometimes decisions involve multiple conditions combined using logical operators. These are essential for building more complex decisions.

    Operator Meaning Example
    AND (&&) Both conditions must be true (A > 10) AND (B < 20)
    OR (||) At least one condition must be true (A == 5) OR (B == 10)
    NOT (!) Reverses the condition NOT (A == B)

    Tips for Good Decisions

    Writing clear and effective decision structures is essential for creating reliable flowcharts. Follow these best practices.

    Best Practices

    • Write clear and simple conditions — avoid overly complex logic.
    • Ensure all possible outcomes are considered — don't leave paths undefined.
    • Use meaningful labels for Yes and No paths (e.g., "Yes: Valid", "No: Invalid").
    • Avoid complex conditions inside decision symbols — split them if needed.
    • Test each path to verify correctness.
    • Use parentheses for clarity in complex conditions.
    • Prefer positive conditions over negative ones for readability.
    • Keep decision symbols readable — don't overload with long text.

    Additional Examples

    Example 1: Check Even or Odd

    Start
       ↓
    Read a number N
       ↓
    Is N % 2 == 0?
       ├── Yes → Print "N is Even"
       └── No  → Print "N is Odd"
       ↓
    Stop

    Example 2: Check Voting Eligibility

    Start
       ↓
    Read age
       ↓
    Is age >= 18?
       ├── Yes → Print "Eligible to Vote"
       └── No  → Print "Not Eligible to Vote"
       ↓
    Stop

    Example 3: Grade Calculation

    Start
       ↓
    Read marks
       ↓
    Is marks >= 90?
       ├── Yes → Print "Grade A"
       └── No  → Is marks >= 75?
                 ├── Yes → Print "Grade B"
                 └── No  → Is marks >= 60?
                           ├── Yes → Print "Grade C"
                           └── No  → Print "Fail"
       ↓
    Stop
    Explanation This example uses the If – Else If – Else structure to check multiple grade conditions.

    Did You Know?

    Interesting Fact

    Decision making is the core of all programs. Every "if" statement in programming is fundamentally based on the flowchart decision symbol. From simple login checks to complex AI decisions, all rely on this basic concept.

    Frequently Asked Questions

    Q1. What is a decision box in a flowchart?

    A decision box is a diamond-shaped symbol used to represent a condition that leads to different paths based on Yes/No or True/False results.

    Q2. How many types of decision structures are there?

    There are three main types: Simple Decision, If – Else If – Else, and Nested Decision.

    Q3. What are the two outcomes of a decision?

    The two main outcomes are True (Yes) and False (No).

    Q4. Why is decision making important in flowcharts?

    Decision making enables flowcharts to branch based on conditions, making them dynamic, intelligent, and useful for real-life problem solving.

    Q5. What is the difference between If-Else and Nested If?

    If-Else checks a single condition with two outcomes, while Nested If contains one decision inside another for more complex logic.

    Key Takeaways

    • Decision making evaluates conditions and chooses paths.
    • Represented by the diamond (♦) symbol.
    • Common outcomes: Yes/No or True/False.
    • Three types: Simple, If – Else If – Else, Nested.
    • Uses comparison operators: ==, !=, >, <, >=, <=.
    • Logical operators (AND, OR, NOT) combine multiple conditions.
    • Every "if" statement in programming is a decision structure.
    • Essential for making flowcharts and programs intelligent.

    Key Takeaway

    Decision structures allow a flowchart to think and act based on conditions — making it powerful and useful for any problem. Mastering decision making is essential for programming, logical thinking, and building intelligent systems.

    Flowchart = Visual Thinking → Smart Solutions → Better Results! 🚀