文章
11
粉丝
169
获赞
28
访问
56.0k
 
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<time.h>
//给你一个字符串S,要求你将字符串中出现的所有"gzu"(不区分大小写)子串删除,输出删除之后的S。
//就是说出现“Gzu”、“GZU”、“GZu”、"gzU"都可以删除
void del(char b[],int c){
    char str_1[100];
    char *p=&b[c+3];
    //printf("%s\n",p);
    strcpy(str_1,p);
    b[c]='\0';
    strcat(b,str_1);
};
void  main(){
    void del(char b[],int c);
    char str[100];
    int a,i;
    scanf("%s",str);
    for(a=0;a<100;a++)
    {
        if(str[a]=='G'||str[a]=='g')
            if(str[a+1]=='z'||str[a+1]=='Z')
  ...
登录后发布评论
暂无评论,来抢沙发