HIT해
[프로그래머스] 대소문자 바꿔서 출력하기 본문
728x90
https://school.programmers.co.kr/learn/courses/30/lessons/181949
import Foundation
let s1 = readLine()!
for i in s1{
if i.isLowercase{
print(i.uppercased(), terminator: "")
}else{
print(i.lowercased(), terminator: "")
}
}
'Swift > Swift 알고리즘' 카테고리의 다른 글
[Swift] 프로그래머스 - 덧셈식 출력하기 (0) | 2024.08.31 |
---|---|
[Swift] 프로그래머스 - 특수문자 출력하기 (0) | 2024.08.31 |
[프로그래머스 LV0] 정수 찾기 (0) | 2024.07.11 |
[프로그래머스 LV0] 분수의 덧셈 (0) | 2024.07.09 |
[프로그래머스 LV0] 두 수의 나눗셈 (0) | 2024.07.09 |