#include <iostream>
using namespace std;
class mean
{
int a,b;
public:
void input()
{
cout<<"\nEnter a two values:";
cin>>a>>b;
}
friend float result(mean m);
};
float result(mean m)
{
return(m.a+m.b)/2.0;
}
int main()
{
cout<<"MEAN VALUE";
mean a;
a.input();
cout<<"\nMean Value is "<<result(a);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: