#!/bin/bash
J=1
K=1
while [ $K -le $1 ]
do
echo "$K $J $1"
J=`expr $J \* $K`
K=`expr $K + 1`
done
echo "$1! = $J"
