#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
char s[];
while(gets(s))
{
int len = strlen(s);
printf("%c", s[]-); //小写字母的ASCII比对应的大写字母大32
for(int i = ; i < len; i++)
{
if(s[i-] == ' ') printf("%c", s[i]-);
else printf("%c", s[i]);
}
printf("\n");
}
return ;
}

HDU 2026 首字母变大写的更多相关文章

  1. HDOJ 2026 首字母变大写

    Problem Description 输入一个英文句子,将每个单词的第一个字母改成大写字母. Input 输入数据包含多个测试实例,每个测试实例是一个长度不超过100的英文句子,占一行. Outpu ...

  2. ytu 1938:首字母变大写(水题)

    首字母变大写 Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 110  Solved: 43[Submit][Status][Web Board] Desc ...

  3. HDOJ2026首字母变大写

    首字母变大写 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Subm ...

  4. YTU 2760: 字符串---首字母变大写

    2760: 字符串---首字母变大写 时间限制: 1 Sec  内存限制: 128 MB 提交: 343  解决: 136 题目描述 输入一行英文句子,将每个单词的第一个字母改成大写字母. 输入 一个 ...

  5. HDU_2026——将单词的首字母变大写

    Problem Description 输入一个英文句子,将每个单词的第一个字母改成大写字母.   Input 输入数据包含多个测试实例,每个测试实例是一个长度不超过100的英文句子,占一行.   O ...

  6. 首字母变大写(stringstream的应用)

    Problem Description 输入一个英文句子,将每个单词的第一个字母改成大写字母.   Input 输入数据包含多个测试实例,每个测试实例是一个长度不超过100的英文句子,占一行.   O ...

  7. [Go] 第一个单词首字母变大写:Ucfirst(),第一个单词首字母变小写:Lcfirst()

    import ( "unicode" ) func Ucfirst(str string) string { for i, v := range str { return stri ...

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

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

  9. "首字母变大写"组件:<capitalize> —— 快应用组件库H-UI

     <import name="capitalize" src="../Common/ui/h-ui/text/c_text_capitalize"> ...

随机推荐

  1. .bash_profile和.bashrc的区别(如何设置生效)

    /etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置. /etc/bashrc:为每一个 ...

  2. windows JDK 版本切换

    windows JDK 版本切换1. HKEY_LOCAL_MACHINE“SOFTWARE“JavaSoft“Java Runtime Environment“CurrentVersion, 把这个 ...

  3. 创建MySQL存储过程示例

    创建MySQL存储过程是学习MySQL数据库必须要掌握的知识,下文对创建MySQL存储过程作了详细的介绍,供您参考学习. AD:2013大数据全球技术峰会课程PPT下载 下文将教您如何创建MySQL存 ...

  4. ExtJS之Ext.getDom

    <!DOCTYPE html> <html> <head> <title>ExtJs</title> <meta http-equiv ...

  5. [转]fedora启动telnet服务

    http://blog.chinaunix.net/uid-22996709-id-3056078.html 在win7上安装了SecurityCRT,登录VMWARE Fedora时候登录超时,检查 ...

  6. http://blog.sina.com.cn/s/blog_5b9b4abe01017638.html

    http://blog.sina.com.cn/s/blog_5b9b4abe01017638.html

  7. jackson set properties to default value (取消让jackson 赋予默认值)

    you can define it with Integer rather than int or long. define it with a package type. jackson wont' ...

  8. servlet学习笔记二

    Servlet主要内容: 1)表单处理 2)乱码问题 3)页面跳转 4)生命周期 一.表单处理 Servlet获取表单数据 request.getParameter():通过表单参数名获取参数值 re ...

  9. 淘宝设计师入门:设计师SDK环境配置

    把淘宝官方的做法先过一遍:( http://open.taobao.com/doc/detail.htm?id=102527 ) 1.配置JAVA环境http://www.cnblogs.com/ti ...

  10. Mybatis SqlSessionTemplate 源码解析

    As you may already know, to use MyBatis with Spring you need at least an SqlSessionFactory and at le ...