Answers for "program to create function factorial in c"

C
2

factorial c program using for loop

#include<stdio.h>
int main(){
  int i,f=1,num;
 
  printf("Enter a number: ");
  scanf("%d",&num);
 
  for(i=1;i<=num;i++)
      f=f*i;
 
  printf("Factorial of %d is: %d",num,f);
  return 0;
}
Posted by: Guest on January-10-2021
0

factorial of a number in c

factorial
Posted by: Guest on February-24-2022

Code answers related to "program to create function factorial in c"

Code answers related to "C"

Browse Popular Code Answers by Language