1021: [编程入门]迭代法求平方根 海事守门鼠 摘要:迭代法求平方根 ```c #include #include int main() { double x, y, a; scanf("%lf", &a); …… 题解列表 2024年03月09日 0 点赞 0 评论 487 浏览 评分:9.9
[C语言]迭代法——调用函数求解 摘要:解题思路:被调函数中进行平方根的求解,在主调函数中输出,使代码更加清晰,增加可读性注意事项:注意循环的判断条件是>=不要忘了等号哦宝宝们参考代码:#include <stdio.h>float fun…… 题解列表 2024年11月25日 0 点赞 0 评论 693 浏览 评分:9.9
耍个小聪明 摘要:# Python解决平方根问题 在python中,math库提供sqrt()函数来完成平方根操作。 那还有啥好说的?! ```python import math a = int(input…… 题解列表 2022年08月08日 1 点赞 0 评论 790 浏览 评分:10.0
迭代法求平方根 摘要:参考代码:#include<stdio.h>#include<math.h>int main(){ int a; float x1,x2=1.0; scanf("%d",&a); while(fab…… 题解列表 2024年07月17日 2 点赞 0 评论 453 浏览 评分:10.0
迭代法求平方根python 摘要:参考代码:a=int(input())b=awhile True: c=(b+a/b)/2 if abs(b-c)<0.00001: …… 题解列表 2025年01月16日 1 点赞 0 评论 900 浏览 评分:10.0
C语言简单解法 摘要:需要理解题目所给的牛顿迭代法这个公式,理解之后就很好上手了#include#includedouble num(double a){ double x=a; double…… 题解列表 2025年02月26日 4 点赞 0 评论 1630 浏览 评分:10.0
把公式的逻辑搞懂就知道怎么写了,猛攻!!! 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>double number,guess,x1=1;int main(){&nbs…… 题解列表 2025年11月11日 1 点赞 0 评论 675 浏览 评分:10.0