This commit is contained in:
Erik C. Thauvin 2021-05-09 18:54:43 -07:00
parent 358b8b4582
commit fec26fffd7
2 changed files with 6 additions and 3 deletions

View file

@ -108,8 +108,11 @@ open class CryptoPrice(val base: String, val currency: String, val amount: Doubl
@JvmStatic
fun main(args: Array<String>) {
val price = marketPrice("BTC")
println("BTC: ${price.amount}")
listOf("BTC", "BCH", "BSV", "ETH","ETH2","ETC").forEach {
with(marketPrice(it)) {
println("$base: $amount")
}
}
}
/**