9 lines
244 B
C++
9 lines
244 B
C++
#include <bits/stdc++.h>
|
||
using namespace std;
|
||
// Hello world
|
||
int main() {
|
||
char s[15];
|
||
cin >> s; // 原因:Hello world中存在空格,而cin会只读取前半部分Hello,所以长度是5
|
||
cout << strlen(s);
|
||
return 0;
|
||
} |