I am having trouble with this program myself. I have maybe completed 60% of the program so far:Originally Posted by 4 yr old unregistered person
can anyone help me with direction in this program? I know i need to have a 1d/2d char array, but i'm getting hung up on printing the ID and results for each A, B, C D valueCode:#include <iostream> using namespace std; void main() { int kID, qID=1, pos=0, qcount=0, correct=0; char key[19]; char quiz[50][19]={0}; cout << "Key? "; for (pos=0; pos<20; pos++) { cin >> key[pos]; } while (qID != 0) { qcount++; cout << "Quiz? "; cin >> qID; for (pos=0; pos<10; pos++) { cin >> quiz[qcount][pos]; } } cout << endl; cout << "There were " << qcount-1 << " quizzes scanned." << endl; cout << endl; cout << "ID SCORE" << endl; cout << "-- -----" << endl; for (pos=0; pos<10; pos++) { cout << quiz[pos]; " "; //grade quizzes for (pos=0; pos<10; pos++) { if (quiz[pos] == key[pos]) { correct++; } } } //start listing quiz IDs and scores cout << qID << " " << "tst" << endl; for (pos=0; pos<10; pos++) { cout << quiz[pos] << endl; } cout << "KEY" << endl; for (pos=0; pos<10; pos++) cout << key[pos] << endl; cin.get();cin.get(); }