+ 2
How can i print the value of "1/998001" in cpp or c?
When i try to to do that with double it always shows 0.00000... by default how can i fix that? https://code.sololearn.com/ccqFX6jGd45a/?ref=app
2 odpowiedzi
+ 17
1/998001 is doing integer division because both sides are whole numbers. Add a .0 to the end of either number to get a double.
When I tried it, though, the result was printed in scientific notation since it's such a small number.
+ 1
i should have guess that thank you so much