C Language
#include<stdio.h> #include<conio.h> void main( ) { long int n, i, s = 1; clrscr ( ); printf("Enter any Number = "); scanf("%1d", & n);, for (i = 1;i <= n;i++) { s= s * i; } printf("Factorial = %ld" , s); getch( ); } /*OUTPUT*/ Enter any Number = 4 Factorial = 24