Factorial program in C utilizing for loop
Factorial program in C. Finds any variety of Factorial Program in C. A factorial is a operate that multiplies a quantity by each quantity under it. Factorial of any quantity is the product of an integer and all of the integers under it
1 |
#embody <stdio.h>int predominant(){int c, n, reality = 1;printf("Enter a quantity to calculate its factorialn");scanf("%d", &n);for (c = 1; c <= n; c++)reality = reality * c;printf("Factorial of %d = %dn", n, reality);return 0;}</stdio.h> |
1 |
<span style="color: #ff6600;">Output</span>Factorial of 6 = 720 |