Computer Science, asked by Eduline3136, 10 months ago

Write a ‘C’ program to display factorial of a number.

Answers

Answered by mehrin20
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