Answer to Question #202418 in C++ for Rajay Myrie

Question #202418

A teacher has stored the percentage scores for eighty-six (86) students; she has the following tasks to complete: • compute and print the average score. • add an additional fourteen percent to each student’s score Write a pseudo-code that will first allow the teacher to enter the initial percentage score for each student, as well as add the 14% to each student’s score. Your solution must then compute and display the average score. Your solution must implement and use an array to store and process the percentage scores


1
Expert's answer
2021-06-06T17:08:10-0400


#include <iostream>


using namespace std;


int main()
{ 
    int n=86;
    int marks[n];
    cout<<"Enter the marks of the 86 students: \n";
    for(int i=0;i<n;i++){
        cin>>marks[i];
    }
    //• compute and print the average score.
    int sum=0;
    for(int i=0;i<n;i++){
        sum+=marks[i];
    }
    cout<<"\nAverage score is: "<<sum/n<<endl;
    //add an additional fourteen percent to each student’s score
    for(int i=0;i<n;i++){
        marks[i]=marks[i]+14;
    }
    cout<<"Student scores after 14 percent increase: \n";
    for(int i=0;i<n;i++){
        cout<<marks[i]<<"\t";
    }
    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