题解 | #字符串去特定字符#

字符串去特定字符

https://www.nowcoder.com/practice/d5d0450134db4cb994a1b323a35262da

#include <stdio.h>
#include<string.h>
int main() {

    char c, s[100];
    gets(s);
    c = getchar();
    int i, n = strlen(s);
    for (i = 0; i < n; i++) {
        if (s[i] != c)printf("%c", s[i]);
    }
    return 0;
}

全部评论

相关推荐

ohs的小木屋:比不少实习待遇高了
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务