end if
end repeat
if (the student;s answer is not the same as the correct answer)
mark the student's answer incorrect
read the student's answer and the correct answer
repeat 25 times
#include <iostream>
#include <string>
using namespace std;
int main()
{
string answer_correct;
string answer_student;
for(int i=0;i<25;i++)
{
cout << "Enter the correct answer: ";
getline (cin, answer_correct);
cout<<"Enter student's answer: ";
getline (cin, answer_student);
if (answer_student != answer_correct)
{
cout<<"Student's answer is not correct"<<endl;
}
}
return 0;
}
Comments
Leave a comment