Showing mean and variance - Weddo

v32457_p

New member
Oct 25, 2021
81
0
0
Showing mean and variance

Hello!

I'm writing a program that calculates and shows the mean and variance of two integers. The result I'm getting is 7. But that's not the mean of 5 and 10 (num1 and num2). What can I do to show both mean and variance together on the screen? What should I put after return to show both mean and variance?

Thank you.

#include <stdio.h>


double statistics (int x, int y){

double mean, var;

mean = (x+y)/2;
var = ((x-mean)*(x-mean) + (y-mean)*(y-mean)) /2;

return...

Showing mean and variance