#include <iostream>
// #include <cmath>
#include <math.h>
int main()
{
using namespace std;
double area; // 只是定义了一个变量而已,怎么就不会了么
cout << "Enter the floor area,in square feet,of your home:";
cin >> area; // 没有这一步函数不能初始化,分配了内存但是没有值
double side;
side = sqrt(area);
cout << "That's the equivalent of a square " << side
<< " feet to the side." << endl;
return 0;
}
2_4_p25_sqrt.cpp
最新推荐文章于 2024-11-05 17:16:24 发布