0
点赞
收藏
分享

微信扫一扫

自考新教材-p145_5

code_balance 2022-06-08 阅读 144

源程序:

#include <iostream>
using namespace std;
class f
{
private:
int x, y;
public:
void f1()
{
x = 10;
y = 10;
}
void print()
{
cout << x << "," << y << endl;
}
};
int main()
{
f a;
a.f1();
a.print();
system("pause");
return 1;
}

运行结果:

自考新教材-p145_5_#include

 


举报

相关推荐

0 条评论