home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
awk
/
awk320.zip
/
FACT.AWK
< prev
next >
Wrap
Text File
|
1990-06-04
|
197b
|
12 lines
# calculate and print the factorial of the input
function factorial(n) {
if (n <= 1)
return 1
else
return n * factorial(n - 1)
}
{
print $1, factorial($1)
}