'commit'
This commit is contained in:
9
TangDou/LanQiaoBei/ZhongGaoJi/LanQiao14STEMA202301/5.cpp
Normal file
9
TangDou/LanQiaoBei/ZhongGaoJi/LanQiao14STEMA202301/5.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user