Interactive C playgroundLOOPS & CONDITIONS
CODE. STEP. UNDERSTAND.
See your code in motion.
Follow every condition, branch, and iteration.
Source codeC
condition.c editable
Ready to visualize
Try
age = 15 to follow the else branch. Edit the code above, then press Play.Supported C syntax
One int declaration followed by if, optional else if branches, and an optional else. Compare the variable with an integer using <, <=, >, >=, ==, or !=. Braced bodies support printf text and one %d with the variable. Nested conditions, logical operators, and full programs are not supported.
Execution flowREADY
01 · DECLARE
int age = 20;IF
age >= 18pendingtrue →
BRANCH BODY
printf("Adult\n");↓ false · check next branch
ELSE
Otherwisependingthen →
BRANCH BODY
printf("Minor\n"); Continue after the conditional
Ready to execute
Step through the declaration, test the condition, and follow the selected branch.
VARIABLE WATCHLine —
ageintTHE BRANCH RULE
Check in order.
Run the first match.
Skip the rest.
Console outputstdout 0 lines
Output will appear here when printf executes▌