Computer Science, asked by atharv1702, 11 months ago

write a c program to input a number and calculate its factorial using for loop​

Answers

Answered by venkataniveditha1997
2

Answer:

#include <stdio.h >

int main ()

{

int n, fact=1;

printf ("enter a number") ;

scanf ("%d", &n) ;

for(int i=1;i<=n;i++)

fact=fact *i;

printf ("%d", fact) ;

}

Similar questions