07-25-2023, 09:40 AM
program ControlFlowExample;
begin
// Variable declaration
var
i: Integer;
for i := 1 to 5 do
begin
if i mod 2 = 0 then
WriteLn(i, ' is even')
else
WriteLn(i, ' is odd');
end;
end.
begin
// Variable declaration
var
i: Integer;
for i := 1 to 5 do
begin
if i mod 2 = 0 then
WriteLn(i, ' is even')
else
WriteLn(i, ' is odd');
end;
end.