Course of Raku / Essentials / Control flow essentials / Conditional checks / Exercises
How many numbers are equal?
Problem
Create a program that takes three integer numbers from the user and tells how many of them are equal. The program should be able to work with both positive and negative numbers.
Example
A possible run of the program is shown below:
$ raku how-many-equal-numbers.raku
Number 1: 3
Number 2: -4
Number 3: 3
2If all three numbers are different, the program prints
0.
Solution
Course navigation
← Solution: FizzBuzz | Solution: How many numbers are equal? →
Translations of this page: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська