Word Capitalization

简介: Word Capitalization

文章目录

一、Word Capitalization

总结


一、Word Capitalization

本题链接:Word Capitalization


题目:


A. Word Capitalization

time limit per test2 seconds

memory limit per test256 megabytes

inputstandard input

outputstandard output

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.


Examples


input

ApPLe


output

ApPLe


input

konjac


output

Konjac


本博客给出本题截图:

image.png

题意:首字母变大写,其余字母不变

AC代码

#include <iostream>
using namespace std;
const int N = 1010;
char s[N];
int main()
{
  cin >> s;
  if (s[0] >= 'a' && s[0] <= 'z') s[0] = s[0] - 'a' + 'A';
  cout << s;
  return 0;
}

总结

Capitalization 大写

capital 大写字母

capitalize 让首字母大写

水题,不解释


目录
相关文章
|
7月前
|
C# 开发工具 数据安全/隐私保护
C# 实现 Word 加盖骑缝章效果
C# 实现 Word 加盖骑缝章效果
|
1月前
word技巧
【10月更文挑战第24天】word技巧
36 1
|
存储 XML 自然语言处理
Word操作与应用
Word操作与应用
171 0
|
Java
Hello Word你真的理解了么?
Hello Word你真的理解了么?今天教我的表弟,有些感悟
159 0
Hello Word你真的理解了么?
Word
Word
133 0
Word
Word - 原来 Word 竟可以折叠?
Word - 原来 Word 竟可以折叠?
177 0
Word - 原来 Word 竟可以折叠?