帮帮忙吧大佬们,我实在是不会了,学生党一枚,没钱发悬赏😭
2条回答 默认 最新
CSDN专家-link 2021-11-23 07:18关注n是什麽啊?是某个字符吗?
#include <stdio.h> int main() { char s[1000]; int i=0,count=0; char n; gets(s); n = getchar(); while(s[i] != '\0') { if(s[i] == n) count++; i++; } printf("%d",count); return 0; }本回答被题主选为最佳回答 , 对您是否有帮助呢?评论 打赏 举报 编辑记录解决 1无用