Skip to content

Commit

Permalink
이슈 #323에서 솔루션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 19, 2024
1 parent d76d1dc commit e899cba
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Programmers/대문자와_소문자.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <string>
#include <vector>

using namespace std;

string solution(string my_string) {
string answer = "";
for (char c : my_string) {
if (islower(c)) {
answer += c + ('A' - 'a');
} else if (isupper(c)) {
answer += c - ('A' - 'a');
}
}

return answer;
}

0 comments on commit e899cba

Please sign in to comment.