Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string input;
- getline(cin, input);
- input[0] = toupper(input[0]);
- for (int i = 0; i < input.size(); i++)
- {
- if (i == ' ' || i == ',' || i == '-')
- {
- input[i + 1] = toupper(input[i + 1]);
- }
- }
- cout << input << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement