Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
124758 | 李俊博 | 数组输出 | C++ | Accepted | 0 MS | 264 KB | 599 | 2025-07-12 13:45:47 |
//getchar接收一个字符。包括空格字符 //cin>>c;//cin无法接受空格字符 #include<bits/stdc++.h> using namespace std; int a[10]; 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!" } */ for(int i=1;i<=10;i++){ cin>>a[i]; } for(int i=1;i<=10;i++){ cout<<a[i]<<" "; } return 0; }