Run ID:2584

提交时间:2024-01-13 18:08:33

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