| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 81559 | 陈俊洁 | 字符串长度判断 | C++ | Compile Error | 0 MS | 0 KB | 407 | 2024-07-12 14:44:33 |
#include<bits/stdc++.h> using namespace std; int main() { char s1[151],s2[151]; int s1_l,s2_l; cin>>s1>>s2; s1_l=0; s2_l=0; for(int i=0; i<151; i++) { if(s1[i]!='\0') { s1_1++; } else { break; } for(int i=0; i<151; i++) { if(s2[i]!='\0') { s2_l++; } else { break; } } if(s1_l==s2_l){ cout<<"yes" }else{ cout<<"no"; } return 0; }
Main.cc: In function 'int main()':
Main.cc:11:4: error: 's1_1' was not declared in this scope
s1_1++;
^
Main.cc:24:3: error: expected ';' before '}' token
}else{
^
Main.cc:28:2: error: expected '}' at end of input
}
^