Jishan's Log 10: Codeforces 281A solution

Codeforces 281A: Word Capitalization

What does the problem want?

This problem is simple. Just capitalize the first word of the sentence. That's it!

How to solve it?

The Algorithm:

1) Take a string
2) Convert the first word to upper.

The Code:

#include<bits/stdc++.h>
using namespace std;

#define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);


int main()
{

    fastio;
    string scin >> s;
    s[0] = toupper(s[0]);
    cout << s << "\n";
    

Comments

Popular posts from this blog

Jishan's Log 14: Codeforces 69A solution

Jishan's Log 12: Codeforces 236A solution

Jishan's Log 13: Codeforces 96A solution