i'm trying to get the percentage difference to be rounded to 1 decimal place, however this code is not working and is making the output all wrong and mixed up. does anyone know how i could make only the percentage difference rounded to one decimal place? thanks
Did you #include <iomanip>? You need that for setprecision().
I just added in << endl to start a new line for each set of data and it's rounding to one decimal place. You can pull the cout << std::fixed << std::setprecision(1); out to before the other cout statement to get all the numbers in that format.