第四个C++程序:ComputeAreaWithConsoleInput
#include<iostream>
using namespace std;
int main()
{
double r, s;
cout << "Please input the radius:" ;
cin >> r;
s = r * r * 3.14159;
cout << "The area is:" << s << endl;
return 0;
}
《C++程序设计》P28
#include<iostream>
using namespace std;
int main()
{
double r, s;
cout << "Please input the radius:" ;
cin >> r;
s = r * r * 3.14159;
cout << "The area is:" << s << endl;
return 0;
}
《C++程序设计》P28
相关推荐