school/cs142/smcquay/go/lab01/trivia.go
2016-04-06 20:45:34 -07:00

30 lines
804 B
Go

package main
import "fmt"
type QA struct {
question string
answer string
}
func main() {
fmt.Printf("%48s\n", "Basic BYU Trivia")
fmt.Printf("%25s %38s\n\n", "Questions", "Answers")
qas := []QA{
{"What was the original name of BYU?", "Brigham Young Academy"},
{"When was BYU established?", "1875"},
{"Who was the first \"permanent\" principal of BYA?",
"Karl G. Maeser"},
{"When did BYA become BYU?", "1903"},
{"To what sports conference do we belong?",
"Mountain West Conference (MWC)"},
{"WHen did BYU win the national football title?", "1984"},
{"Who won the Heisman Trophy in 1990?", "Ty Detmer"},
}
for _, v := range qas {
fmt.Printf("%-48s %s\n", v.question, v.answer)
}
}