From 61664e9639bfa05ca7c1646224ed3b663876eadf Mon Sep 17 00:00:00 2001 From: nirmay0503 <19ucs061@lnmiit.ac.in> Date: Wed, 23 Oct 2019 20:14:43 +0530 Subject: [PATCH] I added algorithm to find factorial of a number --- Math/factorial.cpp | 18 ++++++++++++++++++ Math/factorial.exe | Bin 0 -> 1564138 bytes Math/factorial.o | Bin 0 -> 1687 bytes 3 files changed, 18 insertions(+) create mode 100644 Math/factorial.cpp create mode 100644 Math/factorial.exe create mode 100644 Math/factorial.o diff --git a/Math/factorial.cpp b/Math/factorial.cpp new file mode 100644 index 000000000..49748fb42 --- /dev/null +++ b/Math/factorial.cpp @@ -0,0 +1,18 @@ +#include +using namespace std; + +int main() +{ + int n; + cout<<"Enter number = "; + cin>>n; + int num=1; + for(int i=1;i