// Homework 13, challenge: Hypotenuse. // // Given a and b (the two short sides of a right triangle), compute the // hypotenuse c, the square root of a*a + b*b. Print all three values with // labels. Show c with two decimals using %.2f. // // a and b are ints, and math.Sqrt takes a float64, so you need a conversion. // // You need the math package. Change the import line to: // import ( // "fmt" // "math" // ) // // Run with: go run exercises/13/homework/04-hypotenuse.go package main import "fmt" func main() { a := 3 b := 4 // TODO: write your code here, in place of this placeholder line: fmt.Println("TODO: replace this line", a, b) }