Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61203 黎瑾萱 字符的前导值和后继值 C++ Presentation Error 1 MS 272 KB 308 2023-12-02 17:34:19

Tests(5/10):


Code:

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