+ 1

Please state the mistake in my program.It state "Arithmetic Exception" on compiling.

Thanks for solving "arithmetic exception"but still I am not getting the desired output. The output should be (3,7,31) https://code.sololearn.com/cSxBisrsF50l/?ref=app

29th Aug 2018, 11:08 AM
Ananya Pandey
Ananya Pandey - avatar
1 Odpowiedź
+ 3
In line 11 you are trying to divide i by j and get the remainder. However, 0 is assigned to j in the first iteration of the for loop. You must not divide a number by 0.
29th Aug 2018, 11:12 AM
Steppenwolf
Steppenwolf - avatar