Umístnení souboru www.TrSek.com/zadania/c_cisla.pas{ C_CISLA.PAS Copyright (c) TrSek alias Zdeno Sekerak }
{ Vytvorte program ktory nacita dve cele cisla (a,b) }
{ a vypise vsetky cele cisla od a po b (Pozor!!! a<b alebo a>b). }
{ }
{ Datum:23.05.2004 http://www.trsek.com }
program cele_cisla;
var a,b:integer;
i:integer;
begin
WriteLn('Vypisem vsetky cele cisla od a po b.');
Write('Zadaj cele cislo a=');
ReadLn(a);
Write('Zadaj cele cislo b=');
ReadLn(b);
WriteLn('Poradie celych cisel je:');
if(a<b)then begin
for i:=a to b do
WriteLn(i);
end
else begin
for i:=a downto b do
WriteLn(i);
end;