Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
62098 杨莹斌 回文字符串I C++ Compile Error 0 MS 0 KB 256 2023-12-17 11:51:26

Tests(0/0):


Code:

#include <cstring> using namespace std; int main (){ char s[1001]; cin >> s; int n = strlen(s); int i = 0,j = n-1; while(i <= j){ if(s[i] == s[j]){ i++; j--; }else{ cout << "no"; return 0; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:2: error: 'cin' was not declared in this scope
  cin >> s;
  ^
Main.cc:15:4: error: 'cout' was not declared in this scope
    cout << "no";
    ^