How can I set the Actual rolls and Expected rolls to no decimal, and Actual percentage and Expected percentage to 1 decimal plus a % symbol ?
http://images.plurk.com/a2f077138ef908ce71f46b08909c998d.jpg
cout << "Point" << setw(17) << "Number of Rolls" << setw(17) << "Actual Percent" << setw(17) << "Expected Rolls" << setw(17) << "Expected Percent" << endl; for (int face = 2; face < arraySize; face++) cout << setw(5) << face << setw(17) << frequency[face] << setw(17) << (frequency[face]/roll) << setw(17) << (intRepeats / expected[face]) << setw(17) << expected[face] << endl;
http://www.cplusplus.com/reference/iostream/ios_base/precision/
Is it possible to no do the cout by many lines? Can I just add something to my code?
Yes you can use setprecision just like you are using setw.