Grades4 - // to the Experiments in this lab. / if (score...

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

View Full Document Right Arrow Icon
// file: Grades.cpp // author: j. dzuback // modified: // date: / /* ********************************************** The program reads a value from the keyboard ********************************************** */ #include <iostream> #include <iomanip> #include <string> # using namespace std; u int main() { int score; char grade; string newGrade; s int count; cout <<"Enter the number of digit: "; cin >> count; c while (count > 0) { cout << "Enter an integer score earned in a course " .."; cin >> score; cout << endl << endl; c // STUDENT -- insert code/modify the program according
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // to the Experiments in this lab. / if (score &gt; 100) cout &lt;&lt; &quot;Warning!! The score is outside the valid range.&quot; &lt;&lt;endl; else if (score &gt; 89) cout &lt;&lt;&quot;Your grade is: A&quot; &lt;&lt; endl; else if (score &gt; 79) cout &lt;&lt;&quot;Your grade is: B&quot; &lt;&lt; endl; else if (score &gt; 69) cout &lt;&lt;&quot;Your grade is: C&quot; &lt;&lt; endl; else if (score &gt; 59) cout &lt;&lt;&quot;Your grade is: D&quot; &lt;&lt; endl; else if (score &gt; 24) cout &lt;&lt;&quot;Your grade is: F&quot; &lt;&lt; endl; else cout &lt;&lt;&quot;Invalid score. .. Go hang yourself&quot; &lt;&lt; endl; count--; } } cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; &quot;***** end of Grades.cpp *****&quot;; cout &lt;&lt; endl; return 0; } // end of main...
View Full Document

Ask a homework question - tutors are online