Answer to Question #109805 in C++ for CHEWE LULEMBO

Question #109805
As a student programmer, you have been tasked to create a program
that will be used by a smaller college to manage test results. The
school has closed because of COVID19 but has continued lessons
online.
As part of the program development life cycle, illustrate and explain
the activities that you are going to do in this project during;
1. Analysis
2. Design
3. Development
4. Testing
5. Implementation
1
Expert's answer
2020-04-16T10:48:13-0400
#include <iostream>


using namespace std;


void checkAnswers(string my, string right);


int main()
{
    string right_answers = "abcacabbb";
    string my_answers;
    cout << "Please, enter all the " << right_answers.size() << " answers in one string!" << endl;
    cin >> my_answers;
    checkAnswers(my_answers, right_answers);
    return 0;
}


void checkAnswers(string my, string right)
{
    int i, counter = 0;
    int num = right.size();
    for(i = 0; i < num; i++)
    {
        if(my[i] != right[i])
            counter++;
    }
    if(counter == 0)
        cout << "All is right! Good job!";
    else
        cout << "You have made " << counter << " mistakes. Please, try again!";
}

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