728x90 반응형 문자열을 정수로 바꾸기 C++1 프로그래머스 Level.1 문자열을 정수로 바꾸기 stoi() 함수를 사용해서 바꿔주는 것으로 문제를 풀었다. #include #include using namespace std; int solution(string s) { int answer = 0; answer = stoi(s); return answer; } https://yeni-0224.tistory.com/entry/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4-C-Level-0-%EB%AC%B8%EC%9E%90%EC%97%B4%EB%A1%9C-%EB%B3%80%ED%99%98 프로그래머스 C++ Level. 0 문자열로 변환 정수 n이 주어질 때, n을 문자열로 변환하여 return하도록 solution 함수를 완성해주세요. #includ.. 2023. 7. 10. 이전 1 다음 728x90 반응형