- 22
- 0
- 约6.24千字
- 约 4页
- 2018-03-08 发布于河南
- 举报
重庆工商大学模拟卷
注意:答题不能超过密封线!本套试卷共 4 页,此页是第 1 页。
frisky.setAge(7);
coutfriskys age: frisky.getAge()endl;
coutbootss age: boots.getAge()endl;
return EXIT_SUCCESS;
}
2. 修改下列C++程序中的错误:
#include iostream
#include cmath
using namespace std;
class Point{
double x;//横坐标
double y;//纵坐标
public:
void set(double ix,double iy){//设置坐标
x=ix; y=iy;
}
double xOffset(){//取横坐标
return x;
}
double yOffset(){//取纵坐标
return y;
}
double angle(){//取点的极坐标
return (180/3.14159)*atan2(y,x);
}
double radius(){//取点的极坐
原创力文档

文档评论(0)