Run ID:100579

提交时间:2024-12-08 14:13:53

#include<iostream> using namespace std; int main(){ /** int a[10000]={0},n,m; cin>>n; for(int i=1;i<=n;i++){ cin>>m; if(a[m]==0){ a[m]++; } } for(int i =1;i<10000;i++){ if(a[i]!=0){ cout<<i<<" "; } } // int long long float double char字符 (一个)单引号 bool //string 字符串 // 字符数组 // morning int a[100] ; float b[100]; char c[100];**/ char c; //cin>>a; cin.get(c);//数字 其实是一个字符 //a = cin.get(); //cin>>a>>b; //cout<<c+2;// 1 49+2 = 51 if(c-1>=32 && c-1<=126){ cout<<c-1<<endl; }else{ cout<<"Input Error!"<<endl; } if(c+1>=32 && c+1<=126){ cout<<c+1<<endl; }else{ cout<<"Input Error!"; } return 0; }