C Programming

C Program to Calculate Factorial Using Function

Calculate Factorial Using Function

This is C Program and shows how can you calculate Factorial using Function.

A user here will enter the number and calculate the factorial using Function. Here are more examples that you can check on factorial.

Source Code

long int factorial(int);
void main()
int n;
long int fact;
printf("Enter number:");
printf("Factorial number of %d=%ld",fact);
long int factorial(int n)
long int fact=1;
for(i=1; i<n; i++)
return fact;


About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

Program by Using External Storage Class
C Programming

C Program by Using External Storage Class

In this article, we are showing you how to write a C Program by using External Storage Class. Before that,