Write a q basic program to count the number of factorials of a number
Answers
Answered by
0
Answer:
factorial of a number entered by the user with explanation....
Answered by
0
Explanation:
- 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; }
Similar questions
English,
3 months ago
Math,
3 months ago
Math,
3 months ago
English,
7 months ago
Social Sciences,
7 months ago
Geography,
11 months ago
Business Studies,
11 months ago