근본없는 코딩
[C++] 백준9086 문자열 본문

#include <iostream>
using namespace std;
int main() {
int t;
char str[1001], res;
cin >> t;
for (int i = 0; i < t; i++) {
cin >> str;
for (int j = 0; j < 1000; j++) {
if (str[j] == '\0') break;
res = str[j];
}
cout << str[0] << res << '\n';
}
return 0;
}'✔ Online Judge' 카테고리의 다른 글
| [C++] 백준11720 숫자의 합 (0) | 2023.06.25 |
|---|---|
| [C++] 백준11654 아스키 코드 (0) | 2023.06.25 |
| [C++] 백준2743 단어 길이 재기 (0) | 2023.06.25 |
| [C++] 백준27866 문자와 문자열 (0) | 2023.06.25 |
| [C++] 백준 2042 구간 합 구하기 (2) | 2023.06.09 |