Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
88761 倪士燊 字符串中最大的数字II C++ Compile Error 0 MS 0 KB 253 2024-08-21 11:17:45

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; char N[1001]; int main(){ cin >> N; int la = strlen(N); char mx = '\0'; for(int i=0;i<=n-1;i++){ if(s[i] > mx) { mx = s[i]; } } cout << mx; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:17: error: 'n' was not declared in this scope
  for(int i=0;i<=n-1;i++){
                 ^
Main.cc:10:9: error: 's' was not declared in this scope
      if(s[i] > mx)
         ^
Main.cc:6:6: warning: unused variable 'la' [-Wunused-variable]
  int la = strlen(N);
      ^