{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Aviles_Juan_assign2

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

/****************************************************/ /* File: Aviles_Juan_Assign2 */ /* */ /* Created by: Juan Aviles */ /* Date: 3 July 2011 */ /* */ /* Program to determine course grade */ /* */ /* Inputs: (keyboard) */ /* 1. Float - weighted total points (<= 100) */ /* */ /* Output: */ /* letter grade using pseudocode grading policy */ /* */ /* Algorithm: Comparisons using if-then-else */ /* */ /****************************************************/ #include <iostream> # using namespace std ; int main () { float score ;
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: char grade = 0 ; // read in total score / cout << endl ; cout << "Enter total score (float, must be <= 100) : " ; cin >> score ; if (score >= 85) { grade = 'A' ; } else if (score >= 75) { grade = 'B' ; } else if (score >= 65) { grade = 'C' ; } else if (score >= 55) { grade = 'D' ; } else { grade = 'F' ; } g // display the result / cout << endl ; cout << "Your grade for CMIS 102 is: " << grade << endl ; c return (0); // terminate with success }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online