1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
const int SIZE = 20;
char instructor[SIZE] = {'B','D','A','A','C','A','B','A','C','D','B','C','D','A','D','C','C','B','D','A'};
char student[SIZE];
ifstream answer;
int letter_ans, total;
for(int n = 0; n < SIZE; n++)
{
cout << "Enter answer number " << n << ". " << endl;
cin >> student;
if (student == 65 || student == 66 || student == 67 || student == 68)
cout << "Please enter an uppercase A, B, C or D. " << endl;
else
for( int i = 0; instuctor[i] && student[i]; i++ )
if( instructor[i] = student[i] )
while (i < SIZE && InputFile >> instructor[i])
total+= student[i]
count++;
|