#!/bin/bash

echo "Hello world!"
echo "Enter a number"
read num

fact=1

while [ $num -gt 1 ]
do
  fact=$((fact * num))  #fact = fact * num
  num=$((num - 1))      #num = num - 1
done

echo $fact

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: