Hi, I'm very new to c++, first semester. I'm having a great deal of trouble with this program I'm suppose to write. Ultimately its supposed to grade a students test with a teachers test. So one array will be the teacher's answers(which is pre-assigned, the book gives the teachers answers), and the second array will be the student's answers which the teacher must type in. What I'm having trouble with is making it so the program recognizes when a letter other than A-D is typed.
I tried a while loop, but a weird error comes up,
operand types are incompatible ( "char*" and "char")
#include <iostream>
#include <cctype>
using namespace std;
void Exam_Intro();
int main()
{
const int Teachers_Array= 20; //Array Size
const int Student_Array=20; // Array Size
This code is broken. It will change every Student exam answer to A, then B, then C, then D. After this loop is done every student answer will be D.
Re-think your logic. And step by step write in comments in English describing what should happen. Once you have the logic sorted then you write the code under each comment :)
e.g
1 2 3 4 5 6 7 8 9 10 11 12
int main() {
// Declare variables/arrays
// Print information
// loop getting answers for student
// loop turning all answers to uppercase
// loop doing a check against teach and calculating score
}