October 2025
Intermediate to advanced
100 pages
2h 27m
English
| Puzzle 3 | As Close as It Gets |
| | fun main() { |
| | val result = 0.1 + 0.2 |
| | if (result == 0.3) { |
| | println("$result is equal to 0.3") |
| | } else { |
| | println("$result is not equal to 0.3") |
| | } |
| | } |
Guess the Output | |
|---|---|
|
|
Try to guess the output (or error) before moving to the next page. |
The program displays the following output:
| | 0.30000000000000004 is not equal to 0.3 |
Read now
Unlock full access