1: #include <stdio.h>
2: int main()
3: {
4: int c, n, fact = 1;
5: printf("Enter a number to calculate it's factorial\n");
6: scanf("%d", &n);
7: for (c = 1; c <= n; c++)
8: fact = fact * c;
9: printf("Factorial of %d = %d\n", n, fact);
10: return 0;
11: }
getsprogramming Tutorials , C Programming, CPP Programming and JAVA Programming , Python Programming , Javascript Programming Welcome to getsprogramming Blog Here You Find Different Programs in Easier way to Explain and gain Knowledge and Try Your Self..Thanks
Monday, 6 July 2015
Write C Program To Find Factorial of Inputed Number
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment