#include using namespace std; // define the struct struct course { string dept; // name of dept int num; // course number float credit; // number of credits bool passfail; // did you take it pass fail }; // don't forget the semicolon! void show_course(course c); // forward declaration of the show_course fn int main() { course c1, c2; // create two courses c1.dept = "COMP"; // update member variables for the courses c1.num = 11; c1.credit = 1.0; c1.passfail = false; c2.dept = "FAM"; c2.num = 53; c2.credit = 0.5; c2.passfail = true; cout << "total credits: " << c1.credit + c2.credit << endl; cout << "Courses are " << endl; show_course(c1); show_course(c2); return 0; } // this function will display the course passed in void show_course(course c) { cout << c.dept << ":" << c.num << endl; }