October 2025
Intermediate to advanced
100 pages
2h 27m
English
| Puzzle 5 | Is It a Number or Not? |
| | fun main() { |
| | val a = Double.NaN |
| | val b = Double.NaN |
| | |
| | println("Are they equal? ${a == b}") |
| | printComparison(a, b) |
| | } |
| | |
| | fun printComparison(a: Any, b: Any) { |
| | println("What about now? ${a == b}") |
| | } |
Guess the Output | |
|---|---|
|
|
Try to guess the output (or error) before moving to the next page. |
The program displays the following output:
| | Are they equal? false |
| | What about now? true |
Read now
Unlock full access