Write a ‘C’ program to display factorial of a number.
Answers
Answered by
0
Factorial program in C
#include <stdio.h>
int main()
{
int c, n, fact = 1;
printf("Enter a number to calculate its factorial\n");
scanf("%d", &n);
for (c = 1; c <= n; c++)
fact = fact * c;
Similar questions