#include <iostream.h> #include <conio.h> int main() { int num,factorial=1; cout << "Enter Number: "; cin >> num; for (int a=1;a<=num;a++) { factorial=factorial*a; } cout<<"Factorial: "<< factorial << endl; return 0; }
#include <iostream.h> #include <conio.h> int main() { int num,factorial=1; cout << "Enter Number: "; cin >> num; for (int a=1;a<=num;a++) { factorial=factorial*a; } cout<<"Factorial: "<< factorial << endl; return 0; }