#include<stdio.h>#include<conio.h>void main( ){int n, i;long int fact = 1;clrscr ();printf(“\n Enter any number”);scanf(“%d”, & n);for (i=1; i < = n; i + +){fact = fact *i;}printf (“The factorial of % d is % 1d”, n, fact);getch ();}
Your experience on this site will be improved by allowing cookies. Read Cookie Policy