C语言程序设计教程(第三版)课后习题5.7 (C++代码) 摘要:解题思路: 根据题目描述,取值在5位数之间,所以范围并不大,利用while循环逐个取int型个位数的方法是没有必要的,毕竟之后多数人还是要把取到的个位数存放到变量或者数组中。而且并不进行计算,那…… 题解列表 2018年02月02日 2 点赞 1 评论 564 浏览 评分:0.0
蓝桥杯基础练习VIP-2n皇后问题 (C++代码) 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <cmath> #include <stdio.h> #include <string> …… 题解列表 2018年02月01日 1 点赞 0 评论 1019 浏览 评分:0.0
蓝桥杯算法提高VIP-大数加法 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<cstdio> #include<cstring> #include<iostream> using namespace std; string…… 题解列表 2018年02月01日 1 点赞 0 评论 767 浏览 评分:0.0
蓝桥杯算法训练VIP-A+B problem (C++代码) 摘要:解题思路:注意事项:参考代码:#include<cstdio> #include<cstring> #include<iostream> using namespace std; string…… 题解列表 2018年02月01日 0 点赞 0 评论 691 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.1 (C++代码) 摘要:解题思路: 利用辗转相除法,求出最大公约数,最小公倍数即为m*n*除于最大公约数。注意事项: 这里我多写了判断m,n大小,其实这个步骤是没有必要的,大家可以删除if判断试下,理解下为什么f…… 题解列表 2018年02月02日 0 点赞 0 评论 881 浏览 评分:0.0
蓝桥杯基础练习VIP-Huffuman树 (C语言代码) 摘要:解题思路:从小到大排,每次相加元素前移一位注意事项:排序时,数组大小每次减一参考代码:#include<iostream> #include<algorithm> using namespace …… 题解列表 2018年02月01日 0 点赞 0 评论 993 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.2 (C++代码) 摘要:解题思路: 用边输入边判断的方法,同时使用ctype.h的头文件库里的isalpha和isdigit函数分别判断是否字母、数字,省去了用ASCII码进行判断,使代码更简洁。注意事项: 学会…… 题解列表 2018年02月02日 0 点赞 0 评论 875 浏览 评分:0.0
生日日数 (C语言代码) 摘要:#include <stdio.h>struct date{ int year,month,day;};int main(){ int i,n,leap; int s[2][13…… 题解列表 2018年02月01日 0 点赞 0 评论 1069 浏览 评分:0.0
C语言训练-计算t=1+1/2+1/3+...+1/n (C语言代码) 摘要:#include <stdio.h>int main(){ int i,n; double t=0,s=0; scanf("%d",&n); for(i=1;i<=n;…… 题解列表 2018年02月01日 0 点赞 0 评论 851 浏览 评分:0.0
检查一个数是否为质数 (C语言代码) 摘要:#include <stdio.h>int main(){ int i,N; scanf("%d",&N); for(i=2;i<N;i++) if(N%i==…… 题解列表 2018年02月01日 0 点赞 0 评论 1007 浏览 评分:0.0