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

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 > 100) cout << "Warning!! The score is outside the valid range." <<endl; else if (score > 89) cout <<"Your grade is: A" << endl; else if (score > 79) cout <<"Your grade is: B" << endl; else if (score > 69) cout <<"Your grade is: C" << endl; else if (score > 59) cout <<"Your grade is: D" << endl; else if (score > 24) cout <<"Your grade is: F" << endl; else cout <<"Invalid score. .. Go hang yourself" << endl; count--; } } cout << endl << endl << "***** end of Grades.cpp *****"; cout << endl; return 0; } // end of main...
View Full Document

This note was uploaded on 02/08/2011 for the course CSC 101 taught by Professor Joedzuback during the Spring '11 term at Union County.

Ask a homework question - tutors are online