funceval(a, b int, op string)int{var result intswitch op {case"+":
result = a + b
case"-":
result = a -b
case"*":
result = a * b
case"/":
result = a / b
default:panic("unsupported operator:"+ op)}return result
}funcgrade(score int)string{var g :=""switch{case score <0|| score >100panic(fmt.Sprintf("Wrong score: %d", score))case score <60:
g ="F"// 或者 return "F"case score <80:
g ="C"case score <90:
g ="B"case score <=100:
g ="A"}return g
}