Run ID:124744

提交时间:2025-07-12 11:58:31

//getchar接收一个字符。包括空格字符 //cin>>c;//cin无法接受空格字符 #include<bits/stdc++.h> using namespace std; int main(); // 字符的前导值和后继值 char a; a = getchar(); if(a-1>=32 && c-1<=126){ cout<<c-1<<endl; } else{ cout<<"Input,Error!" } if(a+1>=32 && c-1<=126){ cout<<c+1<<endl; } else{ cout<<"Input,Error!" } return 0; } return 0; }