average - return 0; } int qualityPoints (float aver) { if...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
# include <iostream> using namespace std; int qualityPoints (float);// The function takes the average as argument and returns the quality points int main (void) { float average; cout << "Enter the average: "; cin >> average; cout << qualityPoints(average);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: return 0; } int qualityPoints (float aver) { if (90 &lt;= aver &amp;&amp; aver &lt;= 100) return 4; if (80 &lt;= aver &amp;&amp; aver &lt;= 89) return 3; if (70 &lt;= aver &amp;&amp; aver &lt;= 79) return 2; if (60 &lt;= aver &amp;&amp; aver &lt;= 69) return 1; if (aver &lt; 60) return 0; }...
View Full Document

Ask a homework question - tutors are online