Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

Set goals and map progress for the region.

Answered: 1 week ago

Question

What was the role of the team leader? How was he or she selected?

Answered: 1 week ago

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago