Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
62177 夏轩淇 字符串长度判断 C++ Compile Error 0 MS 0 KB 212 2023-12-17 17:28:20

Tests(0/0):


Code:

#include<iostream> using namespace std; int main() { char int n[150],s[150]; cin>>n>>s; int nc=strlen(n); int sc=strlen(s); if(nc==sc){ cout<<"yes"; }else{ cout<<"no"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:16: error: two or more data types in declaration of 'n'
  char int n[150],s[150];
                ^
Main.cc:6:23: error: two or more data types in declaration of 's'
  char int n[150],s[150];
                       ^
Main.cc:7:7: error: 'n' was not declared in this scope
  cin>>n>>s;
       ^
Main.cc:7:10: error: 's' was not declared in this scope
  cin>>n>>s;
          ^
Main.cc:8:17: error: 'strlen' was not declared in this scope
  int nc=strlen(n);
                 ^