home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 March / Chip_2004-03_cd1.bin / software / slunec / app / 6157_8185.exe / {app} / Pascal / Function / Function.pas next >
Encoding:
Pascal/Delphi Source File  |  2003-11-08  |  328 b   |  15 lines

  1. function IncludeTrailingZero(Number, ZeroCount);
  2. begin
  3.     Str := IntToStr(Number);
  4.     for c:= 1 to ZeroCount-1 do
  5.     begin
  6.         if 10^c > Number then
  7.             Str := '0' + Str;
  8.     end
  9.     Result := Str;
  10. end;
  11.               
  12. for a := 0 to 1000 step 50 do           
  13.     Output(IncludeTrailingZero(a, 5));
  14.  
  15.