CPP Program For Factorial
#include<iostream.h> #include<conio.h> void main() { clrscr(); long a,b,c=1; cout << "enter any number" << endl; cin >>a; for(int i=1;i<=a;i++) { c=c*i; } cout << c << endl; getch(); } Output:…
#include<iostream.h> #include<conio.h> void main() { clrscr(); long a,b,c=1; cout << "enter any number" << endl; cin >>a; for(int i=1;i<=a;i++) { c=c*i; } cout << c << endl; getch(); } Output:…