标签:ble getchar class color amp scanf 提交 while cat
#include <stdio.h> #include<string.h> int main(void) { int n; char word[100]; scanf("%d",&n); getchar(); int i; while(n!=0) { gets(word); int k=strlen(word); if(word[k-1]==‘y‘) strcat(word,"es"); else if(word[k-2]==‘s‘||word[k-1]==‘x‘) strcat(word,"es"); else if(word[k-2]==‘s‘&&word[k-1]==‘h‘) strcat(word,"es"); else if(word[k-2]==‘c‘&&word[k-1]==‘h‘) strcat(word,"es"); else if(word[k-1]==‘o‘) strcat(word,"es"); else strcat(word,"s"); puts(word); n--; } return 0; }
似乎用printf提交ac不了,用put可以
标签:ble getchar class color amp scanf 提交 while cat
原文地址:https://www.cnblogs.com/chenlong991223/p/10090787.html