Toggle navigation
Home
Problems
Status
Ranklist
Contests
OSC
FAQ
[Sign In]
[Sign Up]
C语言程序设计教程(第三版)课后习题6.11
Time Limit
1s
Memory Limit
131072KB
Judge Program
Standard
Ratio(Solve/Submit)
61.08%(
645
/
1056
)
Description:
用迭代法求平方根的迭代公式为: X[n+1]=1/2(X[n]+a/X[n]) 要求前后两次求出的得差的绝对值少于0.00001。 输出保留3位小数
Input:
X
Output:
X的平方根
Sample Input:
4
Sample Output:
2.000
Submit
Compiler
C
C++
Java
Python2
Python3
Use advanced editor
Code