Why my code does not work correctly? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why my code does not work correctly?

https://code.sololearn.com/cK6PHsdXeRl4/?ref=app when I run the code, only the text is displayed before the value of the variable is entered. in other compilers the program works correctly. sorry for bad english. :(

2nd Apr 2018, 8:35 AM
Elovic
Elovic - avatar
2 Answers
+ 3
ok now I found it in line 23: (*ptrnumber)%i) causes the error if your intention was to convert it to an int try int(*ptrnumber) changing this will make it work
2nd Apr 2018, 9:02 AM
Aaron Eberhardt
Aaron Eberhardt - avatar
+ 1
thanks all for answers, I really did not notice the division by zero
2nd Apr 2018, 10:03 AM
Elovic
Elovic - avatar