home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_02_05
/
2n05076a
< prev
next >
Wrap
Text File
|
1991-03-04
|
359b
|
29 lines
Program listing
Function ReallyCast9(inputnumber: integer):integer;
var
total:integer;
begin
if inputnumber > 9 then
begin
total:=0;
while (inputnumber >0)do
begin
total:=total+(inputnumber mod 10);
if total >9then
total:=total-9;
inputnumber:=inputnumber div 10;
end;
end
else
total:=inputnumber;
ReallyCast9:=total;
end;