I want to reduce a number by a certain percentage so I have the following calculation in C++:
int originalNumber = 100000;
double reduceBy = (100 - m_percent) / 100;
int reducedNumber = (int)(originalNumber * reduceBy );
If m_percent is e.g. 10 then reduceBy
will be 0.000000000000.
How do I simply reduce a number by a ceratin percent in C++.