Computer Science, asked by ghoshrakhi2020, 7 months ago

Write a q basic program to count the number of factorials of a number​

Answers

Answered by pp6609034
0

Answer:

factorial of a number entered by the user with explanation....

Answered by Anonymous
0

Explanation:

  1. long factorial(int);
  2. int main() { int n;
  3. printf("Enter a number to calculate its factorial\n"); scanf("%d", &n);
  4. printf("%d! = %ld\n", n, factorial(n));
  5. return 0; }
  6. long factorial(int n) { int c; long r = 1;
  7. for (c = 1; c <= n; c++) r = r * c;
  8. return r; }
Similar questions