링크 : https://school.programmers.co.kr/learn/courses/30/lessons/12951
#include <string>
#include <vector>
using namespace std;
string solution(string s) {
string answer = "";
bool flag = true;
for(int i = 0; i < s.size(); i++){
if(s[i] == ' '){
answer += " ";
flag = true;
}
else{
if(flag == true){
answer += toupper(s[i]);
}
else answer += tolower(s[i]);
flag = false;
}
}
return answer;
}