diff --git a/Cpp to find LCM b/Cpp to find LCM new file mode 100644 index 0000000..d18c098 --- /dev/null +++ b/Cpp to find LCM @@ -0,0 +1,19 @@ +#include +using namespace std; + +int main() +{ + unsigned int n; + unsigned long long factorial = 1; + + cout << "Enter a positive integer: "; + cin >> n; + + for(int i = 1; i <=n; ++i) + { + factorial *= i; + } + + cout << "Factorial of " << n << " = " << factorial; + return 0; +}