One-Dimension Array Problem

Help me out, my professor gave us this problem, I can't figure it out. And I also do not have a C++ program in my PC because it's too low-tech and no internet. Thanks in advance.

A university gives an entrance exam to new students before allowing them to enroll in their preferred programs. Write a program that will check the score of the student’s entrance exam. The exam has 25 multiple choice questions and here are the correct answers:

1. D 2. C 3. D 4. D 5. A
6. B 7. C 8. A 9. B 10. B
11. C 12. D 13. A 14. B 15. C
16. D 17. D 18. A 19. B 20. A
21. A 22. B 23. D 24. A 25. C

You should have an array that contains the correct answers. Part of the program will accept the student’s answer for each of the 25 questions that will also be stored in an array. After the student’s answers have been entered, the program will display a message if the student passed or failed the exam with the corresponding score. It is required that the student should get 15 correct answers out of the 25 questions. Finally, display the total number of questions correctly answered and the total number of questions incorrectly answered.

Our professor said to follow this format...
Can you create a version of the program that I'm asking and put it in this format?

HERE'S THE SAMPLE FORMAT:

#include <iostream>
#include <string>
using namespace std;

int main ()
{
string names[5][5]={{"Jose","Andres",},{"Apolinario","Manny"}};
string names2[2][2];
int row,col,score=0;

cout<<"Enter 5 names:"<<endl;
for(row=0; row<=1; row++)
{
for(col=0; col<=1; col++)
{
cin>>names2[row][col];
}
}

for(row=0; row<=1; row++)
{
for(col=0; col<=1; col++)
{
if(names2[row][col]==names[row][col])
score++;
}
}
cout<<"Your total correct answer/s is/are: "<<score<<endl;
system("PAUSE");
return 0;
}


closed account (o3hC5Di1)
chrstian wrote:
Can you create a version of the program that I'm asking and put it in this format?


Sorry, but no.
Forum rules state:

forum rules wrote:
Don't post homework questions
Programmers are good at spotting homework questions; most of us have done them ourselves. Those questions are for you to work out, so that you will learn from the experience. It is OK to ask for hints, but not for entire solutions


If you want we can help you get started - but you'll need to do the work.
I suggest you try and modify the format to hold an array for the answers and a way of getting answers from the user.

Give that your best shot and feel free to come back to ask for hints should you need them.

All the best,
NwN
Topic archived. No new replies allowed.