So I am just starting to learn C++ and I was asked to make the following program
The program is suppose to reads in letter grades for a class of any size and displays the number of students who passed (D or better) and the number who failed (E or F).
however my codes produce 0.00 as the percent pass or fail I think there might be a problem in my declaration, or the type I used, it would be great help if anyone can solve this
numberofpass/numberoftotal does integer division, which will give you 0. You need to cast one of them to a double to make it do floating point arithmetic.