Take age and citizenship.
If age >= 18:
If citizenship is "Indian" → Eligible to vote
Else → Not eligible (citizenship issue)
Else → Not eligible (age issue)
Take marks in 3 subjects.
If all marks >= 35:
Calculate average:
If average >= 75 → Distinction
If 60–74 → First Class
Else → Pass
Else → Fail
Take salary and experience.
If salary > 50000:
If experience >= 5 → Promotion eligible
Else → Not eligible (experience low)
Else → Salary too low
Take username and password.
If username == "admin":
If password == "1234":
Login successful
Else:
Wrong password
Else:
Invalid username
Take a number.
If number > 0:
If number % 2 == 0:
If number % 4 == 0 → Divisible by 4
Else → Even but not divisible by 4
Else → Odd positive
Else:
Negative or zero
Take temperature.
If temp < 0:
If temp < -10 → Extreme cold
Else → Freezing
Else:
If temp <= 30 → Normal
Else → Hot
Take income and age.
If income > 300000:
If age < 60 → Tax applicable
Else → Senior citizen discount
Else → No tax
Take marks and attendance %.
If attendance >= 75:
If marks >= 40 → Pass
Else → Fail (low marks)
Else → Not eligible for exam
Take 3 sides of triangle.
If all sides > 0:
If a+b>c and b+c>a and a+c>b:
If all equal → Equilateral
If any two equal → Isosceles
Else → Scalene
Else → Not valid triangle
Else → Invalid input
Take bank balance and withdrawal amount.
If withdrawal <= balance:
If withdrawal <= 20000 → Transaction approved
Else → Limit exceeded
Else → Insufficient balance
Take two numbers.
If first > second:
If first % second == 0 → Divisible
Else → Not divisible
Else:
Reverse logic and check
Take electricity units.
If units <= 100:
Low bill
Else:
If units <= 300:
Medium bill
Else:
High bill
Take age and driving test score.
If age >= 18:
If score >= 80 → License approved
Else → Retest required
Else → Not eligible
Take password length and content.
If length >= 8:
If contains digit:
If contains uppercase:
Strong password
Else → Medium
Else → Weak
Else → Too short
Take product price and customer type.
Take age and health condition.
Take exam score.
Take time (24-hour format).
Take number.