[C++] 프로그래머스 특수문자 출력하기

문제설명

다음과 같이 출력하도록 코드를 작성해 주세요.


출력예시

!@#$%^&*(\'"<>?:;


풀이

#include <iostream>

using namespace std;

int main(void) {
    string str = "\!\@\#\$\%\^\&\*\(\\\'\"\<\>\?\:\;";
    
    cout << str;
    
    return 0;
}


결과

코드 실행결과

Categories:

Updated:

Leave a comment