利用数组、for、if解决问题 摘要:解题思路:利用第二个数组存放元音字母。注意事项:由于b数组未初始化值,所以需要在最后加上‘\0’作为字符串结束符。参考代码:#include<stdio.h> #include<string.h>…… 题解列表 2023年06月21日 0 点赞 0 评论 143 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n, max,num; while (scanf("%d", &n) != EOF) …… 题解列表 2023年06月21日 0 点赞 0 评论 219 浏览 评分:0.0
自由下落的距离计算 摘要:#include <stdio.h> int main(){ int N,i; float M,sum=0.0; scanf("%f%d",&M,&N); sum+=M; f…… 题解列表 2023年06月21日 0 点赞 0 评论 173 浏览 评分:0.0
【c++】校门外的树 统计数组和的技巧 摘要:解题思路:发现这道题以前在lg上面写过,就把代码放过来,顺便本蒟蒻水一篇题解。其实这道题我将有树的地方赋值为1,反则为0,这样可以通过把数组相加得到树的个数,有点巧妙。注意事项:虽然但是,如果时间要求…… 题解列表 2023年06月21日 0 点赞 0 评论 304 浏览 评分:9.9
【c++】蛇形矩阵简单易懂 摘要:解题思路:本蒟蒻想到了先建立出一个不少于100x100的蛇形矩阵保存,在根据用户所输入的行列数进行输出。注意事项:输出的行列数参考代码:#include <iostream>#include <bit…… 题解列表 2023年06月21日 0 点赞 0 评论 390 浏览 评分:9.3
2868-最长最短单词 摘要:解题思路:注意事项:请各位朋友帮忙指正,测试的时候只有91分。参考代码:struct Test{ char s[105]; int n; }; int main(){ struct T…… 题解列表 2023年06月21日 0 点赞 0 评论 233 浏览 评分:0.0
2867-单词的长度 摘要:解题思路:注意事项:本题如果用C++语言会特别的方便,因为C++语言中有单词分隔函数。用C语言可能比较繁琐。参考代码:int main(){ char s[1001]; int len,i;…… 题解列表 2023年06月21日 0 点赞 0 评论 285 浏览 评分:9.9
题目 1378: C hicken and rabbit s题解 摘要:1.解题思路注意鸡的腿数和兔的腿数都是偶数,不可能共有奇数条腿,所以当m%2==1时,输出0 0.否则,最多只动物时,全都是鸡,输出m/2;最少只动物时,全都是兔,输出celi(m/4).2.参考代码…… 题解列表 2023年06月21日 0 点赞 0 评论 172 浏览 评分:9.9
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h> int main() { char str[5000], str1[105][55]; …… 题解列表 2023年06月20日 0 点赞 0 评论 251 浏览 评分:6.0
2848-基因相关性 摘要:解题思路:注意事项:如果本题采用gets()的输入方法,那么会一直报错,不清楚为什么。scanf()就不会报错。参考代码:#include<stdio.h> #include<string.h> …… 题解列表 2023年06月20日 0 点赞 0 评论 172 浏览 评分:0.0