|
more than 450 programs for free
|
![]() English |
![]() Slovensky |
![]() Česky |
![]() Šarišsky |
|
Category: Homework in Pascal Program: C_cisla.pas File exe: C_cisla.exe Write round number from a to b. Numbers a,b are inputs.
Views: 1726x
{ 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; WriteLn('Koniec'); ReadLn; end. [Run] [Save] [Print] [Send e-mail] |
|