Replace nodes by greater nodes


why is the error with this code?
plz resolve.


pass the sum parameter by refernce
and change rreturn type to void
highlighted the updates