26 lines
345 B
Go
26 lines
345 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
|
|
"git.linuxhg.com/Go_Training/keyboard"
|
|
)
|
|
|
|
func passFail() {
|
|
fmt.Print("Enter a grade: ")
|
|
grade, err := keyboard.GetFloat()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
var status string
|
|
|
|
if grade >= 60 {
|
|
status = "passing"
|
|
} else {
|
|
status = "failing"
|
|
}
|
|
|
|
fmt.Println("A grade of", grade, "is", status)
|
|
}
|