Advertisement
193030

Diff 1 Word capitalization

Jul 20th, 2020
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. // https://codeforces.com/problemset/problem/281/A
  2. // Example program
  3. #include <iostream>
  4. #include <string>
  5. using namespace std;
  6. int main()
  7. {
  8.   string inputString;
  9.   cin >> inputString;
  10.   if(int(inputString.at(0))>=97)
  11.   {
  12.       int newChar = inputString.at(0) -=32;
  13.       inputString.at(0) = char(newChar);
  14.       cout << inputString;
  15.   }
  16.   else{
  17.       cout << inputString;
  18.   }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement