针对二维系坐标上的点,定义一个点类,实现简单的数据输入输出。

针对二维系坐标上的点,定义一个点类,实现简单的数据输入输出。

#include <iostream>
using namespace;
class Point
{
public:
int x;
int y;
};
int main()
{
Point p;
cin >> p.x >> p.y;
cout << p.x << "," << p.y;
return 0;
}