Factorial of any number (0-9999999999)

This is a simple program which is used to calculate the factorial of any number. It accepts a single digit number and even a 10 digit number to calculate the factorial ! This program is designed using  python programming language.

def fact(x):
    f=1;
    for i in range (1,x+1):
        f=f*i;
    print "factorial is: "
    print f;

x=input();
fact(x);

Description:
The Function fact(x) takes a number a and performs calculation on that number.

Comments

Popular posts from this blog

Non Restoring Division Algorithm Implementation in C

Hackerrank Modified Kaprekar Numbers Solution

Bit Stuffing Code Implementation in Java