trying_out_go/playground/fuel.go

17 lines
230 B
Go

// part of chapter 9
package main
import "fmt"
type Liters float64
type Gallons float64
func fuel() {
var carFuel Gallons
var busFuel Liters
carFuel = Gallons(10.0)
busFuel = Liters(240.0)
fmt.Println(carFuel, busFuel)
}