Why it doesn't continue? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why it doesn't continue?

Rolling a dice https://code.sololearn.com/cF5TS5F4TVTp/?ref=app

22nd Mar 2021, 9:52 AM
Amateur
2 Answers
+ 6
%f is a format specifier for float. In p2 to p6, you try to print int with %f, which is expected to be float. In a nutshell, you use the wrong format specifier for int. The correct one is %d.
22nd Mar 2021, 9:57 AM
你知道規則,我也是
你知道規則,我也是 - avatar
+ 1
Yeah! Thanks
22nd Mar 2021, 10:07 AM
Amateur