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 s; cin >> s;
s[0] = toupper(s[0]);
cout << s << "\n";
}
Comments
Post a Comment