From bc3d0165e2b42c8faa87ccb341aab71532dc9ab8 Mon Sep 17 00:00:00 2001 From: RadhikaModi123 <56086697+RadhikaModi123@users.noreply.github.com> Date: Fri, 16 Oct 2020 17:49:07 +0530 Subject: [PATCH] first commit --- sumofarray.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sumofarray.cpp b/sumofarray.cpp index 13ecb05..5de7696 100644 --- a/sumofarray.cpp +++ b/sumofarray.cpp @@ -20,6 +20,8 @@ int main(){ int sum(int input[], int n) { int s=0; + //when size of array is zero we will stop + // this is our base case if(n==0) { return 0;