Why to add mod lastly for fibo sum problem

why to lastly add mod lastly on fibo sum problem

@coe17b014 its property of mod
if you want to do mod in a-b you do like this
(a-b+m)%m
this is because if no becomes negative we add m then mod m.
dont forget to hit like and mark resolved if cleared :smiley:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.