C Program Find Factorial of N

By | March 7, 2020

C Program Find Factorial of N


Enter n number to calculate factorial=5
Factorial of 5 is 120

C Code / C Program To Find Factorial of a number N


int main()
    int n, i;
	long fact=1;
	printf("Enter n number to calculate factorial=");
	scanf("%d", &n);
	  fact = fact * i;
	printf("Factorial of %d is %ld", n, fact);
    return 0;

 1,034 total views,  2 views today

Leave a Reply

Your email address will not be published.