문제풀이:
#include <string>
#include <vector>
using namespace std;
string solution(string myString) {
string answer = "";
for(char c: myString)
{
if( c == 'a')
{
c='A';
answer +=c;
}
else if( c> 'A')
answer +=tolower(c);
else
answer +=c;
}
return answer;
}
'코딩테스트' 카테고리의 다른 글
프로그래머스_1단계_ 자릿수 더하기C++ (0) | 2024.04.09 |
---|---|
프로그래머스_0단계_ 더 크게 합치기C++ (0) | 2024.04.09 |
프로그래머스_0단계_ 공배수 C++ (0) | 2024.04.09 |
프로그래머스_0단계_n 번째 원소부터 C++ (0) | 2024.04.09 |
프로그래머스_0단계_모음 제거 C++ (0) | 2024.04.09 |