Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
92462 | 梁敖铭 | 求平方根 | C++ | Wrong Answer | 1 MS | 280 KB | 431 | 2024-10-04 21:15:26 |
#include <iostream> #include <cmath> #include<iomanip> using namespace std; int main(int argc, const char * argv[]) { // insert code here... cout<<"请输入一个实数:"; double x; cin>>x; double s = sqrt(x); cout<<x<<"的平方根为:"<<s<<endl; cout<<x<<"的平方根为:"<<setiosflags(ios::fixed)<<setprecision(2)<<s<<endl;//引用头文件#include<iomanip> return 0; }
------Input------
9
------Answer-----
3
------Your output-----
请输入一个实数:9的平方根为:3 9的平方根为:3.00