C++语言开发示例:04. 数学运算
sqrt.cpp
#include <iostream>
#include <cmath>
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;
cout << "How fascinating!" << endl;
} 最后更新于1年前
本文由人工编写,AI优化,转载请注明原文地址: C++语言开发示例:04. 数学运算
推荐阅读
评论 (0)
发表评论
昵称:加载中...
暂无评论,快来发表第一条评论吧!