I'm having trouble with getting the formatting to work with setw(). I've spent 2 hours on this.. and I thought it would be a simple task..
I'm just trying to get my current setup to have the correct format then I'll work on the rest of it.
Help would be greatly appreciated. Thank you!
Please note:
I've already checked the cplusplus.com part on <iomanip> and setw() but there weren't many examples. Then I checked this: https://en.cppreference.com/w/cpp/io/manip/setw but it doesn't seem to be working as it shows or as I'd expect..
==============================================================================
fname lname test1 test2 test3 test4 avg. grade
==============================================================================
Johnny Lang 100 100 100 98 99.50 A
Tom Jerry 85 90 97 98 92.50 A
Hillary Clinton 90 91 93 95 92.25 A
Billie Jeans 100 92 83 85 90.00 A
Bill Kool 75 85 95 105 90.00 A
Suzie Wang 95 85 75 80 83.75 B
Allie Smith 85 85 80 82 83.00 B
Henry Miller 75 85 82 90 83.00 B
Alice Wood 44 75 88 99 76.50 C
Sally Railey 65 70 75 78 72.00 C
George Michael 0 100 100 0 50.00 F
******************************************************************************
Class Average: 73.09 86.18 85.27 79.18
Class Max: 100 100 100 99
Class Min: 0 70 65 0
==============================================================================
Total As: 36%
Total Bs: 27%
Total Cs: 18%
Total Ds: 9%
Total Fs: 9%
==============================================================================
Current Output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
=============================================================================
fname lname test1 test2 test3 test4 avg. grade
=============================================================================
Johnny Lang
Suzie Wang
Allie Smith
George Michael
Henry Miller
Billie Jeans
Hillary Clinton
Sally Railey
Tom Jerry
Bill Kool
Alice Wood