How to perform division in Go?

后端 未结 0 775
感情败类
感情败类 2020-12-24 10:11
ans:=5.00
return 1.0/ans

It\'s returning 1.0000 instead of 0.2. And I\'ve tried

return float64(1)/float64(ans)
相关标签:
回答
  • 消灭零回复
提交回复
热议问题