热门

最新

红包

立Flag

投票

同城

我的

发布
qq_52076378
qq_52076378
5 年前
trueqq_52076378

请问为什么我的这个代码无法运行呢?我该怎么处理鸭



#include<stdio.h>
int isab(char c){
if(c>='a'&&c<='z')
return 1;
if(c>='A'&&c<='Z')
return 1;
return 0;
}
int vowel(char c){
if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u')
return 1;
if(c=='A'||c=='E'||c=='I'||c=='O'||c=='U')
return 1;
return 0;
}
int main(){
char temp[10000005]={0};
int s=0,t=0,i=0;
while(gets(temp)){
while (temp[s])
if(!isab(temp[s])){
printf("%c",temp[s++]);
t=s;
}else if(isab(temp[t]))
t++;
else{
if(!vowel(temp[s])){
for(i=s+1;i<t;++i)
printf("%c",temp[i]);
printf("%c",temp[s]);
}else
for(i=s;i<t;++i)
printf("%c",temp[i]);
printf("ay");
s=t;
}
printf("\n");
}
}

你问我答
CSDN App 扫码分享
分享
3
2
打赏
  • 复制链接
  • 举报
下一条:
内为大佬给写个自动在线领取的脚本
立即登录