C program to find the FACTORIAL Of a Number :-

#include<stdio.h>
int main()
{
    int n, i, f = 1 ;
    printf("Enter a number : ") ;
    scanf("%d", &n) ;
    for(i = 1 ; i <= n ; i++)
    f = f * i ;
    printf("\nFactorial value of %d is : %d", n, f) ;  
}

Comments

Popular posts from this blog