Answer to Question #275288 in C++ for Mod

Question #275288

Write two procedure called mean_(int N) and var_(int N) that calculate and display the mean and variance of N real entered from the keyboard (without using an array).


1
Expert's answer
2021-12-04T01:27:45-0500
double mean_(int n) {
    double foo = 0;
    for (int i = 0; i < n; i++ ){
        double bar;
        cin >> bar;
        foo += bar;
    }
    return foo/n;
}

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