C语言写这题不能用scanf 摘要:解题思路:注意事项:测试的数据中有空格,使用scanf不能识别空格。要使用gets或者别的支持空格的。参考代码:```c#include<stdio.h>#include&…… 题解列表 2025年08月02日 1 点赞 0 评论 67 浏览 评分:10.0
ASCII值赋值之输出亲朋字符串 摘要:```c #include #include int main() { char a[101], b[101]; //因为字符串长度最大为100,101是因为字符串最后一位是\0 ge…… 题解列表 2023年01月21日 0 点赞 0 评论 595 浏览 评分:9.9
2850: 输出亲朋字符串 摘要:参考代码:#include <bits/stdc++.h> using namespace std; char str2[300]; int tong[150]; int main() {…… 题解列表 2023年10月14日 0 点赞 0 评论 289 浏览 评分:9.9
想太多了,很简单的题搞半天 摘要:解题思路:没啥思路,就循环相加就是注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i,p; char s[100]…… 题解列表 2024年02月15日 0 点赞 0 评论 375 浏览 评分:9.9
要注意测试案例会包括空格 摘要:解题思路:注意事项:要用gets函数,测试数据里面有空格,%s接受不了参考代码:#include<stdio.h>#include<string.h>int main(){ char a[100]; …… 题解列表 2024年04月02日 1 点赞 0 评论 449 浏览 评分:9.9
strlen函数在visual stdio2022里是算上\n的在他这编译器上则不算害我搞了好久 摘要:解题思路:注意事项:参考代码:在这里的编译器#include<stdio.h>#include<string.h>void main(){ char a[101]={0}; char d[…… 题解列表 2022年11月11日 0 点赞 2 评论 583 浏览 评分:0.0
输出亲朋字符串(简短) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char s[100]; gets(s); int …… 题解列表 2023年02月07日 0 点赞 0 评论 265 浏览 评分:0.0
2850: 输出亲朋字符串 摘要:#include<stdio.h> #include<math.h> #include<string.h> # define N 100001 int main() { char …… 题解列表 2023年03月05日 0 点赞 0 评论 184 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:注意添加终止符参考代码:#include<stdio.h>#include<string.h>int main(){ char str[101],str_friend[101]; …… 题解列表 2023年06月01日 0 点赞 0 评论 198 浏览 评分:0.0
为什么不初始化就通不过 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ int i; char a[101] = {'\…… 题解列表 2023年09月21日 0 点赞 0 评论 206 浏览 评分:0.0