I originally tried this, however the % operator isn't defined for float64.
func main(){ var a float64 a = 1.23 if a%1 == 0{ fmt.Println("yay") }else{ fmt.Println("you fail") } }
1.4m articles
1.4m replys
5 comments
57.0k users