A.Word capitalization Codeforces solution

Submit Link

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.

Codeforces 281A. Word Capitalization Solution in C

#include <stdio.h>
#include <string.h>
int main() {

char s[101];
 scanf("%s", s);

  s[0] = toupper(s[0]);
 printf("%s\n", s);

 return 0;
 }

Codeforces 281A. Word Capitalization Solution in CPP

#include<iostream>
#include<string>

using namespace std; int main() { string s; cin>>s; s[0]=towupper(s[0]); cout<<s; }

Codeforces 791/A. Bear and Big Brother

4 thoughts on “Word capitalization codeforces solution”

Leave a Comment