#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. free函数在操作系统内存中的实现【转】

    转自:http://www.2cto.com/kf/201210/160985.html 我一次性malloc十个单位节点的内存空间出来赋值给L, 现在我想一次性删除从第3个到第6个节点,我是这么做的 ...

  2. notifier chain — 内核通知链【转】

    转自:http://blog.csdn.net/g_salamander/article/details/8081724 大多数内核子系统都是相互独立的,因此某个子系统可能对其它子系统产生的事件感兴趣 ...

  3. ACdream 1157 Segments CDQ分治

    题目链接:https://vjudge.net/problem/ACdream-1157 题意: Problem Description 由3钟类型操作: 1)D L R(1 <= L < ...

  4. caffe Python API 之卷积层(Convolution)

    1.Convolution层: 就是卷积层,是卷积神经网络(CNN)的核心层. 层类型:Convolution lr_mult: 学习率的系数,最终的学习率是这个数乘以solver.prototxt配 ...

  5. vue的data用到this问题

    问题:在vue中用vue-awesome-swiper,在data中初始化,用到swiper一个方法onTap,然后再调vue的一个函数,用到this,可是... data() { return { ...

  6. java.util.ConcurrentModification并发修改异常

    在运行下面这段代码时出现了并发修改异常java.util.ConcurrentModification: public static void main(String[] args) { List l ...

  7. 在写一次epoll

    epoll & select & poll只能处理IO相关的操作,epoll每一个操作必须注册到时间监控机制中,并且还需要进程或者线程进行管理. 多进程/多线程 和epoll相比较 e ...

  8. Python 微信公众号发送消息

    1. 公众号测试地址 https://mp.weixin.qq.com/debug/cgi-bin/sandboxinfo?action=showinfo&t=sandbox/index 2. ...

  9. sql server 2008 R2连接失败 错误:18456

    这种问题的解决方法: 第一步:以windows验证模式进入数据库管理器. 第二步:在对新资源管理器中右击实例名称选择属性,弹出服务器属性对话框,我们在左侧栏选择[安全性]选项卡,选中”SQL Serv ...

  10. 关于自建yum源拾遗

    yum参数解释[updates]--->源name=CentOS-$releasever - Updates --->源的名字baseurl=http://mirror.centos.or ...