Computer Science, asked by nishu351, 11 months ago

write a program to print factorial value of no. from 100-200​

Answers

Answered by Anonymous
1

Explanation:

C program to find factorial of a number

long factorial(int);

int main() { int n;

printf("Enter a number to calculate its factorial\n"); scanf("%d", &n);

printf("%d! = %ld\n", n, factorial(n));

return 0; }

long factorial(int n) { int c; long r = 1;

for (c = 1; c <= n; c++) r = r * c;

return r; }

Answered by lrjinde
0

Answer:

Given an integer n, find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) = 1*2*3*4……..*n and factorial(0) = 1

Examples :

Input : n = 1 Output : 1 1! = 1 , hence number of digits is 1 Input : 5 Output : 3 5! = 120, i.e., 3 digits Input : 10 Output : 7 10! = 3628800, i.e., 7 digits

Explanation:

please rate me for the answer to this question

Similar questions