Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
124734 王金檐 字符的前导值和后继值 C++ Compile Error 0 MS 0 KB 278 2025-07-12 11:55:34

Tests(0/0):


Code:

#include <iostream> using namespace std; int main(){ int s; char c; c=getchar(); if(c-1>=32&&c-1<=){ cout<<c-1<<endl; }else{ cout<<"Input Error!"<<endl; } if(c-1>=32&&c-1<=){ cout<<c+1<<endl; }else{ cout<<"Input Error!"<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:19: error: expected primary-expression before ')' token
  if(c-1>=32&&c-1<=){
                   ^
Main.cc:12:19: error: expected primary-expression before ')' token
  if(c-1>=32&&c-1<=){
                   ^
Main.cc:4:6: warning: unused variable 's' [-Wunused-variable]
  int s;
      ^