Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
73986 梁敖铭 情报加密 C++ Compile Error 0 MS 0 KB 353 2024-05-20 21:38:41

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'; } puts(s); } return; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11: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:11: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:11: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:31:1: error: return-statement with no value, in function returning 'int' [-fpermissive]
 return;
 ^