Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61196 黎瑾萱 字符的前导值和后继值 C++ Compile Error 0 MS 0 KB 214 2023-12-02 17:28:07

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:2: error: 'a' was not declared in this scope
  a = n-1;
  ^
Main.cc:7:2: error: 'b' was not declared in this scope
  b = n+1;
  ^