#include<cstdio>
#include<iostream>
#include<cstring>
#include<string>
using namespace std;
char word[50];
int main()
{
int i,len;
gets(word);
len=strlen(word);
if(word[len-1]=='r'&&word[len-2]=='e'||word[len-1]=='y'&&word[len-2]=='l')
{
for(i=0;i<len-2;i++)
printf("%c",word[i]);
}
if(word[len-3]=='i'&&word[len-2]=='n'&&word[len-1]=='g')
{
for(i=0;i<len-3;i++)
printf("%c",word[i]);
}
return 0;
}100
1141:删除单词后缀
最新推荐文章于 2020-08-20 19:52:01 发布