Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
110522 | 魏宏搏 | 字符的前导值和后继值 | C++ | Wrong Answer | 1 MS | 272 KB | 414 | 2025-02-22 11:16:14 |
#include<iostream> using namespace std; char c; int main(){ int qian,hou; //cin>>c; //不能接受空格 c=cin.get(); qian=c-1; hou=c+1; if(qian>=32 && hou<=126){ cout<<qian<<endl; } else{ cout<<"Input Error!"<<endl; } if(hou>=32 && hou<=126){ cout<<hou<<endl; } else{ cout<<"Input Error!"; } return 0; }
------Input------
~
------Answer-----
125 Input Error!
------Your output-----
Input Error! Input Error!