I have seen the hint video and made exactly same code. i have spent more than 3 hours debugging the code.
i am getting this error= “Floating-point exception (SIGFPE)”.
link to code:- https://ide.codingblocks.com/s/180306
I have seen the hint video and made exactly same code. i have spent more than 3 hours debugging the code.
i am getting this error= “Floating-point exception (SIGFPE)”.
link to code:- https://ide.codingblocks.com/s/180306
Hi Arshdeep ,
you are geting floating point exeption because you have defined mod two time one as a global variable in line no. 6 and one as local variable at line no.43 so when you are taking input you are adding value to the local variable but your multiply function uses mod variable which is global and initialized with a garbage value and taking modulus of any value with a garbage value gives you a floating point exeption
correct code : https://ide.codingblocks.com/s/180345
Thank you for correcting that.But still i am getting wrong ans.please tell me my mistake
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.