Loops (for / while)
for (includes the end value), while, and multiline body with begin..end.
Simple enough for a 5-year-old to understand
for loop
for i := 1 to 5 → from 1 to 5 (5 inclusive).
program H;{$MODE DELPHI}var i: Integer;begin for i := 1 to 3 do writeln(i);end.🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)
🎯 Expected output: 1
2
3
4
5