Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

how many of the 2660 courses are GERs. Output the count to the screen. Note that

ID: 3549250 • Letter: H

Question

how many of the 2660 courses are GERs. Output the count to the screen.

Note that the section number sometimes contains letters, so you should

read it in as a string (same as the course number).

course subject and number if the course is a GER and has CSCE as the

course subject

            The file stores the CRN, Course Subject, Course Number, Course Section, and Yes/No if this course is a GER

example of whats on the file


Explanation / Answer

#include #include using namespace std; void printCsce(int total, int CRN, std::string subject, std::string courseNum, std::string courseSection, std::string yesNo); void printCsce(int total, int CRN, std::string subject, std::string courseNum, std::string courseSection, std::string yesNo){ total=2660; for (int i=0; i > CRN; cin >> subject; cin >> courseNum; cin >> courseSection; cin >> yesNo; if (subject=="CSCE" && yesNo=="Yes"){ std::cout > courseNum; cin >> courseSection; cin >> yesNo; if (yesNo=="Yes") { sum++; } } cout