构造递推函数完成迭代 摘要:解题思路:常规思路,凡是迭代就构造递推函数,这比无函数纯循环方法更清晰注意事项:虽然题目没说,但是考虑到我们迭代的所谓xn只能是正整数项,所以如果输入的是负数就跳出一个“wrong”,这样代码更加严谨…… 题解列表 2026年07月11日 0 点赞 0 评论 60 浏览 评分:0.0
新手好理解的代码逻辑 摘要:解题思路:注意事项:while( 差距 >= 0.00001 ){ 继续迭代}参考代码:#include<stdio.h>#include<…… 题解列表 2026年04月01日 0 点赞 0 评论 180 浏览 评分:0.0
把公式的逻辑搞懂就知道怎么写了,猛攻!!! 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>double number,guess,x1=1;int main(){&nbs…… 题解列表 2025年11月11日 1 点赞 0 评论 659 浏览 评分:10.0
模拟------------------------------------------------- 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a; &nb…… 题解列表 2025年03月19日 2 点赞 0 评论 722 浏览 评分:0.0
C语言简单解法 摘要:需要理解题目所给的牛顿迭代法这个公式,理解之后就很好上手了#include#includedouble num(double a){ double x=a; double…… 题解列表 2025年02月26日 4 点赞 0 评论 1616 浏览 评分: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 评论 881 浏览 评分:10.0
迭代法求平方根 自定义函数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>double a[100];double h(double a[],double n){ int i; a[0]=n/2.0…… 题解列表 2024年12月08日 1 点赞 0 评论 1185 浏览 评分:0.0
迭代法求平方根c语言 摘要:参考代码:#include <stdio.h> #include <math.h> double sqrt_iterative(double a) { double x,diff,x_ne…… 题解列表 2024年12月08日 1 点赞 0 评论 1060 浏览 评分:0.0
理解一下牛顿公式吧 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a; double X=1.0,x; scanf("%d",&a); w…… 题解列表 2024年11月28日 0 点赞 0 评论 657 浏览 评分:0.0
迭代法求平方根 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main(){ float a; scanf("%f",&a); float b; b=sq…… 题解列表 2024年11月28日 0 点赞 0 评论 755 浏览 评分:0.0