06. Decision Making
if/else, else-if ladder, switch — detailed + live
Goals:
- Condition true hone pe code chalana
- else-if ladder
- switch-case
1. if / else — simple soch
“Agar marks 90 se zyada → Grade A, warna …” — yahi decision-making hai.
Syntax:
if (condition) {
// true hone pe
} else {
// false hone pe
}
Live practice 1 — Grade system
marks ki value badal-badal ke grades dekho.
Live practice 2 — switch day
day 1–3 try karo.
break na ho to next case bhi chal sakta hai (fall-through) — beginners ke liye almost hamesha break likho.