下面是一个输入半径,输出其面积和周长的C++程序,在下划线处填上正确的语句。#includeiostream using namespace std; const double pi=3.14159; void main() { double r; cout″r=″; ; double l=2.0*pi*r; double s=pi*r*r; cout″\n The long is:″lendl; cout″The area is:″sendl; }
下面是一个输入半径,输出其面积和周长的C++程序,在下划线处填上正确的语句。#includeiostream using namespace std; const double pi=3.14159; void main() { double r; cout″r=″; ; double l=2.0*pi*r; double s=pi*r*r; cout″\n The long is:″lendl; cout″The area is:″sendl; }
正确答案:cin>>r