0
why p%10 is 9.0000000001 while it should be 9 only????? Can someone please help....
since % give remainder p%10 should be 9 but it is not.. https://code.sololearn.com/cAL64z3n6twb/?ref=app
2 Réponses
+ 1
because long binary decimal numbers are cut to 64 bit numbers and it causes small difference
+ 1
Use integral type rather than floating point type if you don't want the fractional part of the number. Note that type casting may be necessary.