C Control Statements Visualizer

Interactive flowcharts for if, if-else, ladder, switch, loops, break/continue

Online Expert Talk Demo

Try Inputs

Logic: ≥75 Distinction, ≥60 First, ≥40 Pass else Fail


1:+ 2:- 3:* 4:/


Shows simple if and if-else decisions.


Shows output of 1..n for different loops.


goto is shown conceptually (JS doesn’t support goto).

Flowchart View

if–else Ladder (Grade)

Enter marks and click “Run Ladder” to highlight the path.

START marks ≥ 75 ? Distinction marks ≥ 60 ? First Class marks ≥ 40 ? Pass Fail END

switch (Calculator Menu)

Enter choice 1–4 and click “Run Switch”.

START switch(choice) case 1: Add case 2: Sub case 3: Mul case 4: Div default END

if / if-else (Number Check)

Enter a number and click “Run If/Else”.

Simple if (positive?)

START n > 0 ? print "Positive" END

if-else (even/odd)

START n % 2 == 0 ? Even Odd END

Looping (while / do-while / for)

Enter n and click “Run Loops” to see outputs.

while

Entry-controlled


          

do-while

Executes at least once


          

for

Known iterations


          

Branching (break / continue / goto)

Click buttons to see how flow changes. (goto shown conceptually)

break demo


          

continue demo


          

goto concept


          

Output

Ready. Enter values and click buttons.