Question: how to calculate percentages in c++?
Answer: 10 Answers. Multiply before dividing: int result = number * 30 / 100; The reason you get the result you get is that division with integer types produces an integer result: 250 / 100 is 2.