Chapter 30. double
or Nothing
Difficulty: 4
No, this Item isn't about gambling. It is, however, about a different kind of “float,” so to speak, and lets you test your skills about basic floating-point operations in C and C++.
Solution
float
and double
in a Nutshell
What's the difference between
float
anddouble
?
Quoting from the C++ standard:
There are three floating point types: |
Get Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.