题解列表

筛选

c语言猴子吃桃问题do-while版

摘要:解题思路:x1是最后一天剩余桃子为1个,从最后一天(day>1)在do-while里面往前面逆推(x1加上剩余一个桃子)乘2,最后printf打印x1最终结果。注意事项:【一定要day>1】,朋友。参……

迭代法求平方根(C语言)

摘要:解题思路:注意事项:初始值X0可以随便设,因为最终经过多次迭代后的结果都会趋近于正确值,只是设为a/2会让时间复杂度更小参考代码:double x,x0,x1,x2;    scanf("%lf",&……

[编程入门]温度转换c

摘要:参考代码:#include<stdio.h>int main(){     double c,f;     scanf("%lf",&f);     c=5*(f-32)/9;     printf(……

[编程入门]温度转换c++

摘要:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){     double c,f;     cin >> f……

二级C语言-成绩归类

摘要:解题思路:注意事项:参考代码#include <stdio.h>#include <stdlib.h>/* run this program using the console pauser or a……