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;

Recommended Answers

All 3 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.