mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
14 lines
278 B
C++
14 lines
278 B
C++
#include <iostream>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int i,fact=1,number;
|
|
cout<<"Enter any Number: ";
|
|
cin>>number;
|
|
for(i=1;i<=number;i++){
|
|
fact=fact*i;
|
|
}
|
|
cout<<"Factorial of " <<number<<" is: "<<fact<<endl;
|
|
return 0;
|
|
}
|