Problem--281A--Codeforces--Word Capitalization

来源:互联网 发布:mysql mac安装包 编辑:程序博客网 时间:2024/06/09 16:35

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

#include<stdio.h>int main(){    char str[1005];    scanf("%s",str);    if(str[0]>='a'&&str[0]<='z')    str[0]^=32;    printf("%s\n",str);}
0 0
原创粉丝点击