|
|
gradeCounter is not equal to 0 then the variable total is casted(converted) into type double and divided by the variable gradeCounter and stored in the variable average .Then average is printed and the stream manipulators control how.setprecision() sets the decimal precision.setiosflags here:| http://www.cplusplus.com/reference/iostream/manipulators/setiosflags/ |