Question: Write down five lines of code that are missing in the following C++ main program. Here is the sample output: Enter the number of courses:

Write down five lines of code that are missing in the following C++ main program. Here is the sample output:

Enter the number of courses: 2 
Enter a course code: OOP244NAA 
Enter course credits: 3 
Enter a course code: MGMT12345XYZ
Enter course credits: 5 Here is the C++ program: 

const int LEN = 20;

struct Course {

char* courseCode;

int credits;

};

int main(){

Course* courses;

char code[LEN+1];

cout << "Enter the number of courses: " << endl;

cin >> numberOfCourses;

// TO-DO: Write the 5 lines of code that are missing

___________________________________ // (1)DMA for courses

___________________________________ { // (2)loop

cout << Enter a course code: ;

cin >> code;

________________________________________ // (3)DMA for coursecode

________________________________________ // (4)seting the coursecode

cout << Enter course credits: ;

__________________________________________ // (5)getting the course credit

} // end of an iteration

return 0;

}

 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!