From 2ad401b602d3203edb1bef91250c6267cd77bc98 Mon Sep 17 00:00:00 2001 From: Md Altamash <91662197+md1altamash@users.noreply.github.com> Date: Sat, 19 Oct 2024 18:32:31 +0530 Subject: [PATCH] Create factorial --- C++/factorial | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 C++/factorial diff --git a/C++/factorial b/C++/factorial new file mode 100644 index 0000000..90e3623 --- /dev/null +++ b/C++/factorial @@ -0,0 +1,13 @@ +//factorial +#include +using namespace std; +int main() +{ + int n,fact=1; + cout<<"enter the factorial number= "<>n; + for(int i=1;i<=n;i++){ + fact=fact*i; + } + cout<