This question has already been answered:

100 / 3 = 33.0 , but I need accuracy to at least a tenth, and better hundredths

enter image description here

Reported as a duplicate by Grundy members, aleksandr barakin , Alexey Shimansky , Community Spirit 16 May '17 at 19:02 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • one
    Try to make a hundred not integer, but floating: double passed_perc = (passed * 100.) / all; ... does not help - obviously bring the operands to double . - Akina
  • @Akina helped, thanks - Adrian

0