题解列表

筛选

C语言训练-8除不尽的数 (C语言代码)

摘要:解题思路:    可以假设第一次运算后的商为a, 则第二次运算的商为2*a。将这两次运算写成两个表达式。对商a的初始值可以随机取,不断加减a,直到两个表达式的差为0。最后将a带入任意表达式,就可得出结……

【明明的随机数】 (C语言代码)

摘要:解题思路:把重复的变成负数,在排序和输出时跳过注意事项:参考代码:#include <stdio.h>#include<math.h>int main (){int a[100];int i,j,m,……

DNA (C语言代码)

摘要:解题思路:先把第一组输出,其余重复的,少输出一行,孩子以为x是*,结果死活不过,后来把*换成x还不对,最后发现热家的X是大写的注意事项:参考代码:#include <stdio.h>#include ……

DNA (C语言代码)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>int main() {  int hang,lie;  int a,b,zu,k,w,e,l,……

Tom数 (C语言代码)

摘要:解题思路:不知道错哪了注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#include <string.h> int main() { long lon……

校门外的树 (C++代码)

摘要:解题思路:注意事项:参考代码:#include "iostream"#include "cstring"using namespace std;int main(){ int l,m,sum; sum……