assignment5temp

assignment5temp - /The problem is to create a grade report...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 //The problem is to create a grade report for students by extracting data from a file. #include <iomanip> #include <iostream> #include <string> #include <fstream> using namespace std int main() { string Name, Grade, fname int count=0 float TotalScore = 0, Score = 0, Average = 0 int NumberofTests = 0 bool fail=0 cout << endl << "Shanil's Ultra Super Very Famous Grade Calculator " << endl cout << "This program will process test scores to provide individuals with a letter grade report according to the following scal e cout << endl << " 90 < average <= 100 A" << endl cout << " 80 < average <= 90 B" << endl cout << " 67.5 < average <= 80 C" << endl cout << " 55 < average <= 67.5 D" << endl cout << " 0 <= average <= 55 F" << endl cout<<"Please enter file name :" cin>>fname ifstream fin fin.open(fname.c_str()) if (fin.fail()==1) { cout<<"the file is retarded"<<endl fail=1 } if( fail!=1) { cout<<"========================================================================================= " < while(!fin.eof()) { if (count!=0) fin.ignore(10,'\n') count++
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/04/2008 for the course CSCI 101L taught by Professor Ghyam during the Spring '07 term at USC.

Page1 / 6

assignment5temp - /The problem is to create a grade report...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online