//Program to calculate the Factorial of number without using function.
#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
int i,n;
long fact=1;
clrscr();
printf("The values of n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
fact=fact*i;
}
printf("\n factorial of %d= %ld",n,fact);
getch();
}
#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
int i,n;
long fact=1;
clrscr();
printf("The values of n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
fact=fact*i;
}
printf("\n factorial of %d= %ld",n,fact);
getch();
}