From 78805168b53ceda25a16f632afe162261ce4879d Mon Sep 17 00:00:00 2001 From: Udhay Date: Mon, 12 Oct 2020 09:13:18 +0530 Subject: [PATCH 1/2] ProductArrayPuzzle.cpp --- Others/ProductArrayPuzzle.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Others/ProductArrayPuzzle.cpp diff --git a/Others/ProductArrayPuzzle.cpp b/Others/ProductArrayPuzzle.cpp new file mode 100644 index 0000000..df4d5f0 --- /dev/null +++ b/Others/ProductArrayPuzzle.cpp @@ -0,0 +1,17 @@ +#include +using namespace std; +int main() { + int n,a; + cin>>n; + while(n--){ + cin>>a; + int arr[a]; + long long int y=1; + for(int i=0;i>arr[i];y=y*arr[i];} + for(int i=0;i Date: Mon, 19 Oct 2020 08:37:12 +0530 Subject: [PATCH 2/2] Update ProductArrayPuzzle.cpp --- Others/ProductArrayPuzzle.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Others/ProductArrayPuzzle.cpp b/Others/ProductArrayPuzzle.cpp index df4d5f0..57f9584 100644 --- a/Others/ProductArrayPuzzle.cpp +++ b/Others/ProductArrayPuzzle.cpp @@ -8,9 +8,7 @@ int main() { int arr[a]; long long int y=1; for(int i=0;i>arr[i];y=y*arr[i];} - for(int i=0;i