22 lines
308 B
C++
22 lines
308 B
C++
#include <bits/stdc++.h>
|
|
#define endl '\n'
|
|
using namespace std;
|
|
|
|
string str;
|
|
|
|
int main(){
|
|
// 两种读入
|
|
// cin >> str; // 局限:遇到空格就结束
|
|
|
|
getline(cin, str);
|
|
|
|
// cout << str;
|
|
|
|
// int len = str.size(); // 字符串.size(); 可以获得字符串的长度
|
|
for(char c : str){
|
|
cout << c << " ";
|
|
}
|
|
return 0;
|
|
}
|
|
|