//In the Name of ALLAH
//This program takes a number and calculates its factorial.
#include <stdio.h>
#include <conio.h>
void main()
 {
 int n;
 int i;
 int x=1;
 // *** The Main Body *** //
 clrscr();
 printf("Enter a number please. The program gives back its factorial.\n");
 scanf("%d",&n);
 for(i=1; i<=n; i++)
	{
	x=i*x;
	}
 printf("%d! = %d",n,x);
 getch();
 }