Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
619 关清声 字符的前导值和后继值 C++ Compile Error 0 MS 0 KB 254 2022-12-23 20:43:17

Tests(0/0):


Code:

#include<iostream> using namespacce std; int main() { char a; cin>>a; if(a-1<=32) { cout<<"Input Error!"; } else { cout<<int(a-1); } if(a+1>=126) { cout<<"Input Error!"; } else { cout<<int(a+1); } return 0; }


Run Info:

Main.cc:2:7: error: expected nested-name-specifier before 'namespacce'
 using namespacce std;
       ^
Main.cc:2:7: error: 'namespacce' has not been declared
Main.cc:2:18: error: expected ';' before 'std'
 using namespacce std;
                  ^
Main.cc:2:18: error: 'std' does not name a type
Main.cc: In function 'int main()':
Main.cc:6:2: error: 'cin' was not declared in this scope
  cin>>a;
  ^
Main.cc:6:2: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/4.8.2/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
Main.cc:9:3: error: 'cout' was not declared in this scope
   cout<"Input Error!";
   ^
Main.cc:9:3: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/4.8.2/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
Main.cc:13:3: error: 'cout' was not declared in this scope
   cout<<int(a-1);
   ^
Main.cc:13:3: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/4.8.2/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
Main.cc:17:3: error: 'cout' was not declared in this scope
   cout<<"Input Error!";
   ^
Main.cc:17:3: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/4.8.2/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
Main.cc:21:3: error: 'cout' was not declared in this scope
   cout<<int(a+1);
   ^
Main.cc:21:3: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/4.8.2/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^