Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- )
- type Point struct {
- x float64
- y float64
- }
- func main() {
- p := new(Point)
- p.x = 3.0
- p.y = 4.0
- fmt.Println(fmt.Sprintf("(%.2f, %.2f)", p.x, p.y))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement