please help me debug this program. it should look like this. 0001 /* C Lab Assig
ID: 3615324 • Letter: P
Question
please help me debug this program. it should look like this. 0001 /* C Lab Assignment 10 CSE 1020.0030002 Programmer: Brian Yarborough laser-man@verizon.net00030004 C Program to accept a grade and determine if the value entered is between0005 100 and -1.0006 */0007 #include <iostream>00080009 // code for the lab identification function001000110012 void Lab10identification() {0013 cout << "CSE 1020 Lab 10 Brian Yarborough email: laser-man@verizon.net" << endl0014 << endl;00150016 } // Lab10identification00170018 char getLetterGrade (int gradeIn) {0019 if (gradeIn < 60 && gradeIn >= 0)0020 return 'F';0021 if (gradeIn >= 60 && gradeIn < 70)0022 return 'D';0023 if (gradeIn >= 70 && gradeIn < 80)0024 return 'C';0025 if (gradeIn >= 80 && gradeIn < 90)0026 return 'B';0027 if (gradeIn >= 90 && gradeIn <= 100)0028 return 'A';0029 } // letterGrade00300031 int getNumericGrade (){0032 int gradeIn, error = 0;0033 do {0034 cout << "Enter a numeric grade (0-100, -1 to stop): ";0035 cin >> gradeIn;00360037 if (gradeIn < -1 "" gradeIn > 100) parse error before string constant0038 cout << "Number out of range. Try again." << endl;0039 else error = 0;0040 } while (error == 1);0041 return gradeIn;0042 } //NumericGrade confused by earlier errors, bailing out00430044 int main() {0045 int gradeIn;0046 char letterGrade;00470048 Lab10identification();00490050 do {0051 gradeIn = getNumericGrade();0052 if (gradeIn != -1 && gradeIn >= 0 && gradeIn <= 100); {0053 letterGrade = getLetterGrade(gradeIn);0054 cout << "The student's letter grade is: " << letterGrade << endl;0055 }0056 } while (gradeIn != -1);00570058 cout << "Good-bye" << endl;0059 return 0;0060 } // main00610062 0001 /* C Lab Assignment 10 CSE 1020.0030002 Programmer: Brian Yarborough laser-man@verizon.net00030004 C Program to accept a grade and determine if the value entered is between0005 100 and -1.0006 */0007 #include <iostream>00080009 // code for the lab identification function001000110012 void Lab10identification() {0013 cout << "CSE 1020 Lab 10 Brian Yarborough email: laser-man@verizon.net" << endl0014 << endl;00150016 } // Lab10identification00170018 char getLetterGrade (int gradeIn) {0019 if (gradeIn < 60 && gradeIn >= 0)0020 return 'F';0021 if (gradeIn >= 60 && gradeIn < 70)0022 return 'D';0023 if (gradeIn >= 70 && gradeIn < 80)0024 return 'C';0025 if (gradeIn >= 80 && gradeIn < 90)0026 return 'B';0027 if (gradeIn >= 90 && gradeIn <= 100)0028 return 'A';0029 } // letterGrade00300031 int getNumericGrade (){0032 int gradeIn, error = 0;0033 do {0034 cout << "Enter a numeric grade (0-100, -1 to stop): ";0035 cin >> gradeIn;00360037 if (gradeIn < -1 "" gradeIn > 100) parse error before string constant0038 cout << "Number out of range. Try again." << endl;0039 else error = 0;0040 } while (error == 1);0041 return gradeIn;0042 } //NumericGrade confused by earlier errors, bailing out00430044 int main() {0045 int gradeIn;0046 char letterGrade;00470048 Lab10identification();00490050 do {0051 gradeIn = getNumericGrade();0052 if (gradeIn != -1 && gradeIn >= 0 && gradeIn <= 100); {0053 letterGrade = getLetterGrade(gradeIn);0054 cout << "The student's letter grade is: " << letterGrade << endl;0055 }0056 } while (gradeIn != -1);00570058 cout << "Good-bye" << endl;0059 return 0;0060 } // main00610062 0001 /* C Lab Assignment 10 CSE 1020.0030002 Programmer: Brian Yarborough laser-man@verizon.net00030004 C Program to accept a grade and determine if the value entered is between0005 100 and -1.0006 */0007 #include <iostream>00080009 // code for the lab identification function001000110012 void Lab10identification() {0013 cout << "CSE 1020 Lab 10 Brian Yarborough email: laser-man@verizon.net" << endl0014 << endl;00150016 } // Lab10identification00170018 char getLetterGrade (int gradeIn) {0019 if (gradeIn < 60 && gradeIn >= 0)0020 return 'F';0021 if (gradeIn >= 60 && gradeIn < 70)0022 return 'D';0023 if (gradeIn >= 70 && gradeIn < 80)0024 return 'C';0025 if (gradeIn >= 80 && gradeIn < 90)0026 return 'B';0027 if (gradeIn >= 90 && gradeIn <= 100)0028 return 'A';0029 } // letterGrade00300031 int getNumericGrade (){0032 int gradeIn, error = 0;0033 do {0034 cout << "Enter a numeric grade (0-100, -1 to stop): ";0035 cin >> gradeIn;00360037 if (gradeIn < -1 "" gradeIn > 100) parse error before string constant0038 cout << "Number out of range. Try again." << endl;0039 else error = 0;0040 } while (error == 1);0041 return gradeIn;0042 } //NumericGrade confused by earlier errors, bailing out00430044 int main() {0045 int gradeIn;0046 char letterGrade;00470048 Lab10identification();00490050 do {0051 gradeIn = getNumericGrade();0052 if (gradeIn != -1 && gradeIn >= 0 && gradeIn <= 100); {0053 letterGrade = getLetterGrade(gradeIn);0054 cout << "The student's letter grade is: " << letterGrade << endl;0055 }0056 } while (gradeIn != -1);00570058 cout << "Good-bye" << endl;0059 return 0;0060 } // main00610062 Explanation / Answer
please rate - thanks there were actually very few errors! /* C Lab Assignment 10 CSE1020.003 Programmer: Brian Yarborough laser-man@verizon.net C Program to accept a grade and determine if thevalue entered is between 100 and -1. */ #include using namespace std; // code for the lab identification function void Lab10identification() { coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.