题解列表

筛选

C语言完数判断代码

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int max;//最大数 int num2[100] = {0};//因素……

自由下落的距离计算

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main() { int m, n; float ret=0.0, tmp=0.0, sum……

水仙花数判断

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main(){ for(int i=100;i<=999;i++){ int n=i, s……

求分数序列和(辗转相除法?)

摘要:注意事项: 规律:p/q,p+q/p ……,这么一个规律,用辗转相除法就很好做了,第一次接触这个方法,还是在求最大公约数和最小公倍数,不记得了的xd,可以回去看看 参考代码: ```c #i……

C语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>typedef struct linkednode{    int data;    struct ……

与7无关的数(自定义函数)

参考代码:```c#includeintm(inta)//这个函数是判断它的十进制表示法中某一位上的数字是否为7,感觉放在主函数太挤了,干脆拿出来了{intb=a,k=1;//用k来判断while(b){if(b%10==7){k--;}b=b/10;}returnk;//若是,

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h> typedef struct linkedstack {    int data;    st……