Answer to Question #218208 in C++ for abc deefgh

Question #218208

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


1
Expert's answer
2021-07-17T04:53:18-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS