From e984cd628572f0bcfe3a48418296a79048f336e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com> Date: Mon, 26 Feb 2024 13:46:34 +0800 Subject: [PATCH] 'commit' --- TangDou/LanQiaoBei/LanQiao14STEMA202301/5.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 TangDou/LanQiaoBei/LanQiao14STEMA202301/5.cpp 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