document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. function szazas(szam:integer):string;
  2. var
  3.   tmp: string;
  4. begin
  5.   if szam>999 then
  6.   begin
  7.     Result:=\'#\';
  8.     exit;
  9.   end;
  10.   tmp:=\'\';
  11.   case Length(IntToStr(szam)) of
  12.     1: Result:=Egyesek[szam];
  13.     2: begin
  14.           if (((szam div 10)=1) or ((szam div 10)=2)) and (szam-((szam div 10)*10)<>0) then tmp:=Extra[szam div 10]
  15.           else tmp:=Tizesek[szam div 10];
  16.           Result:=tmp+Egyesek[szam-((szam div 10)*10)];
  17.        end;
  18.     3: begin
  19.          tmp:=Egyesek[szam div 100]+\'száz\';
  20.          if (((szam-((szam div 100)*100)) div 10) in [1,2]) and (((szam-((szam div 100)*100)) mod 10)>0) then tmp:=tmp+Extra[((szam-((szam div 100)*100)) div 10)]
  21.          else tmp:=tmp+Tizesek[((szam-((szam div 100)*100)) div 10)];
  22.          Result:=tmp+Egyesek[((szam-((szam div 100)*100)) mod 10)];
  23.        end;  
  24.   end;
  25. end;
');