package main

import "fmt"

// Declare the following untyped constants
// - Cup with a value of 8
// - Pint with a value of 16
// - Quart with a value of 32
// - Gallon with a value of 128
const (
	Cup    = 8
	Pint   = 16
	Quart  = 32
	Gallon = 128
)

// Declare the following typed constant:
// - Barrel of type int32 with a value of 4032
const Barrel = int32(4032)

func main() {
	// Fix the following format directives
	fmt.Printf("there are %d cups in 1 gallon\n", Gallon/Cup)
	fmt.Printf("there are %d pints in 1 gallon\n", Gallon/Pint)
	fmt.Printf("there are %d Quarts in 1 gallon\n", Gallon/Quart)

	// Fix the following statement to properly print the correct value
	fmt.Printf("there are %.1f gallons in a barrel\n", float64(Barrel)/float64(Gallon))

	// Fix the following print statements to be left padded with 6 leading zeros
	fmt.Printf("|%06d|%06d|%06d|%06d|%06d|\n", 25, 523, 9, 1048, 12345)
	fmt.Printf("|%06d|%06d|%06d|%06d|%06d|\n", 12345, 9, 1048, 523, 24)

	// Fix the following print statements to be right padded with 6 spaces
	fmt.Printf("|%-6d|%-6d|%-6d|%-6d|%-6d|\n", 25, 523, 9, 1048, 12345)
	fmt.Printf("|%-6d|%-6d|%-6d|%-6d|%-6d|\n", 12345, 9, 1048, 523, 24)

	// correct the order of the arguments in this print statement:
	fmt.Printf("2+2 = %[2]d. The sky is %[3]s. The mascot for Go is a %[1]s", "Gopher", 4, "Blue")
}
