基础训练数列排序 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i=0; int a[1000]; scanf("%d",&n); for(int q=0;q<n;…… 题解列表 2018年08月29日 0 点赞 0 评论 1640 浏览 评分:0.0
算法训练 Fibonacci数列 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int FIB(int n);int main(){ int n; scanf("%d",&n); printf("%d",FIB(n)…… 题解列表 2018年08月29日 1 点赞 6 评论 1026 浏览 评分:4.5
最小三个数 (C语言代码)交换排序法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i=0; int a[1000]; scanf("%d",&n); for(int q=0;q<n;…… 题解列表 2018年08月29日 0 点赞 0 评论 1596 浏览 评分:0.0
输出字符'A'个数 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); for(int i=0;i<n;i++) { printf("A…… 题解列表 2018年08月29日 0 点赞 0 评论 1436 浏览 评分:9.3
与2无关的数 (C语言代码) 摘要:解题思路:这个题解可以算任意位数的数 是不是与2有关 从而求和。依次计算这个数各位数分别是多少,计算这个数的位数为y++,这个在判断是不是2之前++,如果是2.break。在break语句之后,c++…… 题解列表 2018年08月29日 0 点赞 0 评论 1854 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题5.6 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#include <math.h>int main(){ int a; scanf(…… 题解列表 2018年08月29日 2 点赞 0 评论 1011 浏览 评分:0.0
用迭代法求 平方根 公式:求a的平方根的迭代公式为: X[n+1]=(X[n]+a/X[n])/2 要求前后两次求出的差的绝对值少于0.00001。 输出保留3位小数 摘要:参考代码:#include<stdio.h>#include<math.h>//fabs()的用法是#include<math.h>int main() { long double x=4,x1,x…… 题解列表 2018年08月29日 1 点赞 0 评论 4212 浏览 评分:9.2
最小公倍数 (C语言代码) 摘要:解题思路:先算最大公约 最小公倍数等于两个数的乘积除以最大公约数。注意事项:一定要有break;参考代码:#include<stdio.h>int main(){ int n,m; scanf("%d…… 题解列表 2018年08月29日 0 点赞 0 评论 1325 浏览 评分:6.5
拆分位数 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,n; scanf("%d",&n); a=n/100; b=(n-a…… 题解列表 2018年08月29日 0 点赞 0 评论 781 浏览 评分:0.0
C语言训练-阿姆斯特朗数 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,a,b,c; for(i=2;i<1000;i++) { a=i/100; b=(i/10)%1…… 题解列表 2018年08月29日 0 点赞 0 评论 1013 浏览 评分:0.0