C++求根号 要不是我是个蒟蒻,也不会发这么简单的内容 C++中有专门求根号的函数,即sqrt() 参数:sqrt(被开根数) 如:根号四:sqrt(4) 上代码: #include<bits/stdc++.h> using namespace std; int main(){ int x; cin>>x; cout<<sqrt(x)<<endl; return 0; }