[SWEA] D1.신문 헤드라인 (C++)

jhyunn·2024년 3월 2일
0

SWEA

목록 보기
9/12

2047. 신문 헤드라인

문제 링크

#include <iostream>
 
using namespace std;
 
int main() {
    char str[80];
    cin >> str;
     
    for (auto& c : str) {
        if (c >= 'a' && c <= 'z') c += 'A'-'a';
    }
    cout << str;
}

 
풀이
아스키 코드 활용

profile
https://github.com/Sungjeonghyun

0개의 댓글