#include <stdio.h>
#include<string.h>
int main(void)
{
int n;
char word[];
scanf("%d",&n);
getchar();
int i;
while(n!=)
{
gets(word);
int k=strlen(word);
if(word[k-]=='y')
strcat(word,"es");
else if(word[k-]=='s'||word[k-]=='x')
strcat(word,"es");
else if(word[k-]=='s'&&word[k-]=='h')
strcat(word,"es");
else if(word[k-]=='c'&&word[k-]=='h')
strcat(word,"es");
else if(word[k-]=='o')
strcat(word,"es");
else
strcat(word,"s");
puts(word);
n--;
}
return ;
}

似乎用printf提交ac不了,用put可以

Problem H: 零起点学算法109——单数变复数的更多相关文章

  1. Problem H: 零起点学算法103——查找最大元素

    #include<stdio.h> #include<string.h> int main() { ]; while(gets(a)!=NULL) { ]; ;a[i]!='\ ...

  2. Problem H: 零起点学算法87——打印所有低于平均分的分数

    #include<stdio.h> int main(){ ],b[]; while(scanf("%d",&n)!=EOF){ ; ;i<n;i++){ ...

  3. Problem H: 零起点学算法28——参加程序设计竞赛

    #include<stdio.h> int main() { int a,b; while(scanf("%d %d",&a,&b)!=EOF) ||b ...

  4. Problem G: 零起点学算法106——首字母变大写

    #include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...

  5. Problem D: 零起点学算法95——弓型矩阵

    #include<stdio.h> #include<string.h> int main() { ][]; while(scanf("%d%d",& ...

  6. Problem F: 零起点学算法42——多组测试数据输出II

    #include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...

  7. Problem E: 零起点学算法34——3n+1问题

    #include<stdio.h> #include<math.h> int main() { int n; n<=pow(,); ; scanf("%d&qu ...

  8. Problem K: 零起点学算法107——统计元音

    #include<stdio.h> int main() { int n; ]; while(scanf("%d%*c",&n)!=EOF) { while(n ...

  9. Problem J: 零起点学算法105——C语言合法标识符

    #include<stdio.h> #include<ctype.h>//调用isalpha函数 int main() { int n; ]; while(scanf(&quo ...

随机推荐

  1. AndroidStudio创建jinLibs文件夹

    在文件中的buildTypes节点下添加 sourceSets.main {          jniLibs.srcDir 'libs'      } 如图

  2. 【Git/GitHub学习笔记】基本操作——创建仓库,本地、远程同步等

    近日想分享一些文件,但是用度盘又太麻烦了(速度也很恶心).所以突发奇想去研究了下GitHub的仓库,这篇文章也就是一个最最最基础的基本操作.基本实现了可以在GitHub上存储文本信息与代码. 由于我的 ...

  3. OPENSOLARIS source

    http://blog.csdn.net/nemo2011/article/details/8543220 http://fxr.watson.org/fxr/source/?v=OPENSOLARI ...

  4. 【洛谷P3651】展翅翱翔之时

    难以吐槽出题人的中二病…… 这题有点类似ZJOI2008 骑士,先跑树上的,最后拆环即可. #include<bits/stdc++.h> #define N 100005 typedef ...

  5. 【模板】解决二分图匹配的强力算法——Hopcroft-Karp算法

    详细解释 参见:http://blog.csdn.net/wall_f/article/details/8248373 简要过程 HK算法可以当成是匈牙利算法的优化版,和dinic算法的思想比较类似. ...

  6. Python的语言特性

    1.Python的函数传参 Python中所有的变量都可以理解为内存中一个对象的“引用”,或者,也可以看似C中的void *的感觉.这里记住的是类型是属于对象的,而不是变量.对象分为两种: 可更改的: ...

  7. js获取jsp上下文地址

    参考自博客:http://blog.csdn.net/lanchengxiaoxiao/article/details/7445498

  8. CentOS 7下安装php-redis扩展及简单使用

    前言: 在本篇文章中,我将给大家介绍如何在CentOS7上安装PHP-Redis扩展以及一些简单的实用,关于如何在Centos上安装redis的,可以参考 Redis在CentOS 7上的安装部署   ...

  9. 调用手机端硬件功能 汇总(android/ios) Native.js示例汇总

    Native.js示例汇总 NJS Native.JS 示例 Native.js虽然强大和开放,但很多web开发者因为不熟悉原生API而难以独立完成.这篇帖子的目的就是汇总各种写好的NJS代码,方便w ...

  10. form 表单获取所有数据 封装方法

    function getFormJson(frm) { var o = {}; var a = $(frm).serializeArray(); $.each(a, function () { if ...