#include <iostream>
usingnamespace std;
class point
{
public:
point() {x = 0; y = 0;}
point(double p, double q) {x = p; y = q;}
double x;
double y;
void print();
point midpt(point, point);
};
int main()
{
point a;
a.print();
point b(1,1);
b.print();
point m = midpt(a,b);
m.print();
return 0;
}
void point::print()
{
cout << x << "," << y;
}
point point::midpt(point a, point b)
{
point m;
m.x = (a.x + b.x) / 2;
m.y = (a.y + b.y) / 2;
return m;
}