i have checked the code multiple times but in first array at index 0 , it always takes 7 as input irrespective of what i am giving as an input , otherwise logic seems fine , please help !
code link : https://ide.codingblocks.com/s/99123
Sum of two arrays wrong output
After second loop, the value of a[0] is automatically changing to 7.
Solution:
Assign the value of A[0] to a variable before second loop and then after the loop assign the value of variable back to A[0].
Hope, this would help.
1 Like
you can give a like, I wonβt mind.
1 Like