I am having a problem with finding percentage. When displaying output from math problems i need: # complete, Right, Wrong, and percentage right. All but percentage comes out correct. If all problems are correct it shows 100% anything else is 0%. What am I doing wrong.
cout << setw(17) << "Addition: " << setw(16) << TotalAddProb << setw(17) << AddCountRight << setw(11) << AddCountWrong << setw(11) << setprecision(2) << fixed << ((AddCountRight) / (TotalAddProb) *100) << "\n";