otakusenpai
09/24/2018, 2:22 AMedwardwongtl
09/24/2018, 3:38 AMInt
division works. You should convert either count
or total
to a Float
in percent()
, such that an accurate percentage can be calculated.Andreas Sinz
09/24/2018, 9:11 AM20/100
produces an int
and because the result would be 0.2
it is rounded to 0
, 2) (count/total)*total
is essentially count
, maybe you meant (count/total) * 100
? 3) you can use val returnVal
instead of var returnVal
otakusenpai
09/24/2018, 9:34 AM