#!/bin/bash
#jc.sh
#计算阶乘的BASH SHELL代码
#张晓辉
t=1
s=1
if [ $1 -ge 13 ]
then
echo input must be less than 13.
else
while [ $t -le $1 ]
do
let s=s*t
let t=t+1
done
echo $1! equals $s.
fi
#jc.sh
#计算阶乘的BASH SHELL代码
#张晓辉
t=1
s=1
if [ $1 -ge 13 ]
then
echo input must be less than 13.
else
while [ $t -le $1 ]
do
let s=s*t
let t=t+1
done
echo $1! equals $s.
fi