var number : Int var factorial :Int var n : Int number = 6 n = 1 factorial = 1 while 1 <= number{ factorial = factorial * n //result * number n += 1 } print(factorial)
To embed this program on your website, copy the following code and paste it into your website's HTML: