Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "math"
- )
- func main() {
- var radius, height float64
- fmt.Scanln(&radius)
- fmt.Scanln(&height)
- volume := math.Pi * radius * radius * height / 3
- area := math.Pi * radius * (radius + math.Sqrt(radius * radius + height * height))
- fmt.Printf("volume = %.4f\narea = %.4f\n", volume, area)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement