Currency comparison

Report a typo

Your little brother wants to learn by heart different currencies, so you want to create a game for him. The game is to read two countries and print true if those countries have the same currency and false if the currencies are different in these countries, or there is no information about at least one of them.

To create this game, you need to write a special dictionary with the following countries and currencies:

Country Currency
Germany Euro
Mali CFA franc
Dominica Eastern Caribbean dollar
Canada Canadian dollar
Spain Euro
Australia Australian dollar
Brazil Brazilian real
Senegal CFA franc
France Euro
Grenada Eastern Caribbean dollar
Kiribati Australian dollar

Note that the names of the countries are to start with a capital letter!

Sample Input 1:

Canada Australia

Sample Output 1:

false

Sample Input 2:

Germany France

Sample Output 2:

true

Sample Input 3:

Germany Latvia

Sample Output 3:

false
Write a program in Kotlin
fun main() {
// put your code here

}
___

Create a free account to access the full topic