Find Factorial of any number

C Program to Find Factorial of any number


#include<conio.h>
#include<stdio.h>
void main()
{
    int number,fact,i;
    clrscr();
    printf("Enter Number : ");
    scanf("%d",&number);
    fact=1;
    for(i=1;i<=number;i++)
    {
        fact=fact*i;
    }
    printf("factorial of %d is : %d",number,fact);
    getch();
}


Output:


 

Comments

Popular posts from this blog

SKILL ROCKS TECH QUESTIONS

C Program for Analog Clock Design

Php Check is date or not