Run ❯
Get your
own
website
×
Change Orientation
package main import ("fmt") func main() { var i = 3.141 fmt.Printf("%e\n", i) fmt.Printf("%f\n", i) fmt.Printf("%.2f\n", i) fmt.Printf("%6.2f\n", i) fmt.Printf("%g\n", i) }
3.141000e+00 3.141000 3.14 3.14 3.141