0

Could not get right answers

https://code.sololearn.com/cEIZN6ssd3n9/#c Input Sample Output Sample 7 4 5 13 10 6 4 3 3 3 5 3 4 3 8 /////// output 0 11 5 0 0 0 12

20th Jul 2022, 6:12 AM
ANIK
ANIK - avatar
1 Réponse
+ 1
Read N before the loop. Make first loop condition i<N instead of i<=N Make sum = 0 inside the loop.
23rd Jul 2022, 10:27 PM
lion
lion - avatar