Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
124767 | 陈华仁星 | 字符串长度判断 | C++ | Compile Error | 0 MS | 0 KB | 233 | 2025-07-12 14:43:38 |
#include <cstdio> #include <cstring> using namespace std; char a[150],b[150]; int main() { scanf("%s %s",a,b); int lena=strlen(a); int lenb=strlen(b); if(lena==lenb) printf("yes"); else printf("no";) return 0; }
Main.cc: In function 'int main()': Main.cc:13:13: error: expected ')' before ';' token printf("no";) ^ Main.cc:13:14: error: expected primary-expression before ')' token printf("no";) ^ Main.cc:7:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%s %s",a,b); ^