Sum of two arrays

problem: https://hack.codingblocks.com/app/contests/1975/931/problem

code: https://ide.codingblocks.com/s/406536

please check my code .I think my logic is correct and after printing the value of p I will reverse the value of p.

Please see the logic and correct it.

Hello @kaustub your logic is not correct as the n1 array can also be of bigger size.
and also both the arrays can be of same size.

correct line 18 as p=z/10

then using the same code I have to use if-else statements ? or some other logic?

@kaustub it depends on you.
Here for your reference i am giving you the code from which you can take help:


if you have any doubt you can ask here:
Happy Learning!!

https://ide.codingblocks.com/s/406600 Please correct this code . Where I am going wrong …I reversed it but not giving correct output…

@kaustub check your code now:


Happy Learning!!