diff --git a/TangDou/LanQiaoBei/LanQiao14STEMA202301/5.cpp b/TangDou/LanQiaoBei/LanQiao14STEMA202301/5.cpp new file mode 100644 index 0000000..37739f5 --- /dev/null +++ b/TangDou/LanQiaoBei/LanQiao14STEMA202301/5.cpp @@ -0,0 +1,9 @@ +#include +using namespace std; +// Hello world +int main() { + char s[15]; + cin >> s; // 原因:Hello world中存在空格,而cin会只读取前半部分Hello,所以长度是5 + cout << strlen(s); + return 0; +} \ No newline at end of file