巨大的数 (C语言代码)用动态分配内存的方法哦 摘要:解题思路:打算使用数组,但是不知道具体会有多少个元素,因此我打算使用malloc和free函数注意事项:malloc和free一点要搭配使用,他们的头文件是stdlib.h参考代码:#include<…… 题解列表 2019年02月18日 2 点赞 0 评论 1285 浏览 评分:0.0
求中间数 (C语言代码)使用带参数的宏来完成 摘要:解题思路:对于一些简单的函数,常常可以使用宏来代替函数 (x>y?x:y)选出x和y中较大者;(x>z?x:z)选出x和z中较大者;这两个较大数中较小者即中间数注意事项:注…… 题解列表 2019年02月16日 1 点赞 2 评论 610 浏览 评分:0.0
计算数字个数 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<ctype.h>int main(void){ char ch; int count = 0; wh…… 题解列表 2019年02月16日 0 点赞 0 评论 922 浏览 评分:0.0
字符逆序 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char a[100]; int b; scanf("%[^\n]s",a)…… 题解列表 2019年02月16日 0 点赞 0 评论 579 浏览 评分:0.0
回文判断 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(void){ int length, i, j; int sign =…… 题解列表 2019年02月16日 0 点赞 0 评论 947 浏览 评分:0.0
蓝桥杯算法提高VIP-三个整数的排序 (C语言代码)使用三目运算符 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(void){ int a, b, c; scanf("%d %d %d", &a, &b, &c); …… 题解列表 2019年02月16日 0 点赞 0 评论 877 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.10 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int N=0; scanf("%d",&N); long long D[100]; D[1]=1; for(i…… 题解列表 2019年02月16日 0 点赞 0 评论 835 浏览 评分:0.0
数据结构-直接插入排序 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<cstdio>int array[1010];void Sort(int length){ for(int i=1;i<length;i++){ in…… 题解列表 2019年02月16日 0 点赞 0 评论 607 浏览 评分:0.0
C二级辅导-同因查找 (C语言代码) 摘要:这个题目利用好取余就可以了取余:如果一个数a能够被一个数b整除,那么a取余b即a%b=0#include<stdio.h>int main(){ for(int i=10;i<=1000;i++) …… 题解列表 2019年02月16日 0 点赞 0 评论 815 浏览 评分:0.0
Hello, world! (C语言代码) 摘要:题目并没有难度,记住一个小技巧,利用scanf的返回值来判断while的结束条件scanf返回值:当输入的结果与转义字符相同时,返回真,不然返回假(比如前面是%d 那么你应该输入一个整数,但是如果输入…… 题解列表 2019年02月17日 0 点赞 0 评论 1433 浏览 评分:0.0