Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
110516 刘佳宇 字符的前导值和后继值 C++ Accepted 1 MS 272 KB 344 2025-02-22 11:14:12

Tests(10/10):


Code:

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