Word Capitalization

Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u

Submit Status Practice CodeForces 281A

Description

Capitalization is writing a word with its first letter as a capital letter. Your task is to capitalize the given word.

Note, that during capitalization all the letters except the first one remains unchanged.

Input

A single line contains a non-empty word. This word consists of lowercase and uppercase English letters. The length of the word will not exceed 103.

Output

Output the given word after capitalization.

Sample Input

ApPLe


ApPLe


konjac


Konjac


很水的一道题,但是要注意if的条件范围和用什么比较

代码:

#include<stdio.h>
#include<string.h>

int main()
{
    char s[1001];
    while(~scanf("%s",s))
    {
        if(s[0]==‘\0‘)
           break;
        else if(s[0]>=‘a‘&&s[0]<=‘z‘)
           s[0]-=32;
        printf("%s\n",s);
    }
    return 0;
}

Word Capitalization

时间: 2024-10-24 13:58:12

Word Capitalization的相关文章

Word中 简单宏的使用

 (注意:打开文档时按住 Shift 键可以阻止 AutoOpen 宏运行) 1:Word中能够自动运行的默认宏代码名称及触发条件如下 -------------------------------------------------------- 1.名称:AutoExec 条件:启动Word或加载全局模板 2.名称:AutoNew 条件:每次生成新文档时 3.名称:AutoOpen 条件:每次打开一个已有文档时 4.名称:AutoClose 条件:每次关闭文档时 5.名称:AutoExit

LeetCode58 Length of Last Word

题目: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. Note: A word is defined as a character sequence consists of non-space

Qt 向word中插入文字(使用QAxWidget和QAxObject)

pro 文件中要加入 CONFIG += qaxcontainer 2. main.cpp [cpp] view plain copy #include <QApplication> #include <QAxWidget> #include <QAxObject> int main(int argc, char* argv[]) { QApplication app(argc, argv); QAxWidget *word=new QAxWidget("Wo

Atitit.office&#160;word&#160;&#160;excel&#160;&#160;ppt&#160;pdf&#160;的web在线预览方案与html转换方案&#160;attilax&#160;总结

Atitit.office word  excel  ppt pdf 的web在线预览方案与html转换方案 attilax 总结 1. office word  excel pdf 的web预览要求1 1.1. 显示效果要好1 1.2. 可以自定义显示界面1 1.3. 不需要控件,兼容性好1 1.4. 支持编辑操作1 2. 纯html预览解决之道(自由的格式)1 3. 转换swf flash方案2 4. 转换pdf方式..更多的浏览器已经直接支持pdf格式查看2 5. 控件方式2 6. Hyb

Java [Leetcode 58]Length of Last Word

题目描述: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. Note: A word is defined as a character sequence consists of non-spa

C#生成Word报表(插入文字、表格和图片)

回家前一个晚上,老板临时安排让写一个读取txt文件的数据和多个图片数据生成一个word文档.时间给得太短只能是回家继续加班,百度真是个好东西这里引用一下我参考的博客http://blog.csdn.net/jiutao_tang/article/details/6574740/ http://xuzhihong1987.blog.163.com/blog/static/2673158720109188465634/  这个博客讲的用录制word宏的方法做参考很有用.感谢这位博友 静下心,认真做,

word Search

Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be us

word在试图打开时遇到错误

最近收邮件的时候碰到,附件打不开.报错如下: 最后百度了下,如下步骤解决 (word 2010 ) 1.点击word -->文件-->  选项 2.在弹出框中选择 信任中心 -->点击信任中心设置 3.在弹出对话框中选择如下设置:(取消受保护的视图前面的勾)

LeetCode:Word Pattern - 字符串模式匹配

1.题目名称 Word Pattern(字符串模式匹配) 2.题目地址 https://leetcode.com/problems/word-pattern/ 3.题目内容 英文:Given a pattern and a string str, find if str follows the same pattern. 中文:给出一组模式(pattern)和一个字符串(str),查看字符串是否与模式匹配 例如: pattern = "abba",str = "dog cat