Write a program to find factorial of the given number.

Written by Sharad Raj on 13th of March, 2018

BASIC PROGRAMS   C LANGUAGE PROGRAMS

PROGRAM CODE

#include<stdio.h>

#include<conio.h>

void main()

{

int  fact=1,num,i;

clrscr();

printf("Enter the number : ");

scanf("%d",&num);

for(i=1;i<=num;i++)

{

fact=fact*i;

}

printf("The factorial of %d is %d",num,fact);

getch();

}