题目1049:字符串去特定字符

    xiaoxiao2021-04-17  73

    #include<stdio.h> #include<stdlib.h> #include<cstring>    int main() {     char s[10000];     char c;     int i=0;     while(scanf("%s",s)!=EOF)     {         getchar();c=getchar();         //scanf("%c",&c);         for (i=0;s[i]!='\0';i++)         {             if(s[i]!=c)               printf("%c",s[i]);         }         printf("\n");     }     return 0; } /**************************************************************     Problem: 1049     User: cust123     Language: C++     Result: Accepted     Time:0 ms     Memory:1020 kb ****************************************************************/

    转载请注明原文地址: https://ju.6miu.com/read-674262.html

    最新回复(0)