Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
115336 徐毅然 情报加密 C++ Compile Error 0 MS 0 KB 369 2025-03-30 12:01:48

Tests(0/0):


Code:

#include <stdio.h> #include <string.h> #define N 100 int main() { char s[N]; while(gets(s)) { int len=strlen(s); for(int i=0; i<len; i++) { if('a'<=s[i]&&s[i]<='y') s[i]++; else if('A'<=s[i]&&s[i]<='Y') s[i]++; else if(s[i]=='z') s[i]='a'; else if(s[i]=='Z') s[i]='A'; } cout<<s; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:7: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
 while(gets(s)) 
       ^
In file included from Main.cc:1:0:
/usr/include/stdio.h:638:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^
Main.cc:13:7: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
 while(gets(s)) 
       ^
In file included from Main.cc:1:0:
/usr/include/stdio.h:638:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^
Main.cc:13:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
 while(gets(s)) 
             ^
In file included from Main.cc:1:0:
/usr/include/stdio.h:638:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^
Main.cc:33:2: error: 'cout' was not declared in this scope
  cout<