Getting two counts and then dividing them

后端 未结 5 1577
攒了一身酷
攒了一身酷 2021-02-08 01:17

I am attempting to get two counts and then divide those two counts to get the ratio of the items I am counting. I saw this post here and tried that. I am getting an error in my

5条回答
  •  野的像风
    2021-02-08 02:02

    The ratio of two integers will be an integer. For example: 10/20 = 0.5 = 0. You need to cast your ratio into a float in order to get an accurate answer.

提交回复
热议问题