Instead of using setprecision, you should use type casting. Basically what static_cast<int> says is that when those numbers are divided and multiplied only show the whole numbers and not the decimal places. So, for example, if the percentage is 67.4 it only shows 67.