题目内容

请使用VC6或使用[答题]菜单打开考生文件夹proj1下的工程proj1,此工程中含有一个源程序文件proj1.cpp。其中每个注释“//ERROR ****found****”之后的一行语句存在错误。请改正这些错误,使程序的输出结果为: The perimeter is 62.8 The area is 314 注意:只修改注释“//ERROR ****found****”的下一行语句,不要改动程序中的其他内容。 // proj1.cpp #include <iostream> using namespace std; const double PI=3.14; class Circle { public: // ERROR ********** found********** Circle(int r) { radius =r; } void Display(); private: const int radius; }; //ERROR ********** found********** void Display() { cout <<"The perimeter is" <<2* PI * radius << endl; cout <<"The area is" <<PI* radius* radius <<endl; } int main() { Circle c(10); //ERROR ********** found********** c::Display(); return 0; }

查看答案
更多问题

The elderly need special care in winter, as they are _______ to the sudden change of weather.

A. sensitive
B. sensible
C. sensational
D. flexible

We can see monuments here and there. Those who have made great ______ to human beings and society will never be forgotten.

A. advance
B. progress
C. contributions
D. achievement

The gift was sent by ______.

A. a friend of my father
B. my father friend
C. my father friend’s
D. a friend of my father’s

He said economic growth is the basis for strengthening defense capability, which is ______ an important indicator of overall national strength.

A. in turn
B. in return
C. on a large scale
D. in a row

答案查题题库