Answer to Question #266261 in C++ for Wendy

Question #266261

Create C++ full program that enables a lecturer to enter marks of student, the

lecture should add marks for Test 1, Test 2 and Test3, then the program should:

✓ Calculate the average of the test,

✓ Show whether the student qualify for exam or not,

✓ It must also shows qualified with a distinction if above 75.


1
Expert's answer
2021-11-15T17:29:24-0500

Source code



#include <iostream>


using namespace std;


int main()
{
    int test1,test2,test3;
    double average;
    
    cout<<"\nEnter score for test 1: ";
    cin>>test1;
    cout<<"\nEnter score for test 2: ";
    cin>>test2;
    cout<<"\nEnter score for test 3: ";
    cin>>test3;
    
    average=(test1+test2+test3)/3.0;
    
    cout<<"\nAverage = "<<average;
    
    if (average>75)
        cout<<"\nThe student is qualified for exam.";
    else
        cout<<"\nThe student is NOT qualified for exam.";
    return 0;
}


Sample Output





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