| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 137381 | gqj | 06字符后移 | C++ | Compile Error | 0 MS | 0 KB | 421 | 2025-11-17 16:24:46 |
#include<iostream> using namespace std; int main(){ char a,b,c,d; cin>>a>>b>>c>>d; if(a='z'){ cout<<char(a-25); }else{ cout<<char(a+1); } if(b='z'){ cout<<char(b-25); }else{ cout<<char(b+1); } if(c='z'){ cout<<char(c-25); }else{ cout<<char(c+1); } if(d='z'){ cout<<char(d-25); } }else{ cout<<char(d+1); } }
Main.cc: In function 'int main()':
Main.cc:6:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(a='z'){
^
Main.cc:11:10: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(b='z'){
^
Main.cc:16:10: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(c='z'){
^
Main.cc:21:10: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(d='z'){
^
Main.cc: At global scope:
Main.cc:24:5: error: expected unqualified-id before 'else'
}else{
^
Main.cc:27:1: error: expected declaration before '}' token
}
^