Files
learngo/14-arrays/11-keyed-elements/07-xratio-example/01-without-keys/main.go
Inanc Gumus a3a0d39a0b add: arrays
2018-12-04 23:51:22 +03:00

22 lines
426 B
Go

// For more tutorials: https://blog.learngoprogramming.com
//
// Copyright © 2018 Inanc Gumus
// Learn Go Programming Course
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
//
package main
import "fmt"
func main() {
rates := [...]float64{
25.5, // ethereum
120.5, // wanchain
}
// uses magic values - not good
fmt.Printf("1 BTC is %g ETH\n", rates[0])
fmt.Printf("1 BTC is %g WAN\n", rates[1])
}