Umiestnenie súboru www.TrSek.com/zadania/delenie.pas
{ DELENIE.PAS                                    Copyright (c) Pheo }
{ Program na urèenie celoèíselného podielu a zvyšku pomocou sèítania}
{ a odèítania. Program urèí vaèšie, menšie èíslo.                   }
{                                                                   }
{ Datum:15.04.2003                             http://www.trsek.com }
 
program delenie;
var a,b,c,d:longint;
begin
   writeln('Zadaj dve nenulove cisla, vydelim ich');
   write('a= ');read(a);
   write('b= ');read(b);
   if a<b then begin c:=b; b:=a; end
          else c:=a;
   d:=0;
   while (c>b) or (c=b) do
   begin
      c:=c-b;
      d:=d+1;
   end;
   write('Podiel je ',d,'   a zvysok je ',c);
   writeln; readln;
end.

Copyrigth by Zdeno Sekerak 2007, http://www.trsek.com