C++ 문자열 뒤집기

Jmnote (토론 | 기여)님의 2019년 7월 16일 (화) 22:31 판 (새 문서: ==개요== ;C++ 문자열 뒤집기 <source lang='c'> #include <iostream> #include <bits/stdc++.h> using namespace std; int main() { string s = "hello"; reverse(s.begin(), s...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

C++ 문자열 뒤집기
#include <iostream>
#include <bits/stdc++.h> 
using namespace std;
int main() {
    string s = "hello"; 
    reverse(s.begin(), s.end()); 
    cout << s;
    // olleh
}

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}