| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 73598 | 石晋骁 | 09能否赴约 | C++ | Compile Error | 0 MS | 0 KB | 287 | 2024-05-19 14:12:01 |
#include<bits/stdc++.h> using namespace std; int main() { int a; cin >> a; if (1<=a<=7) { if (a=1) { cout << "NO"; } else if(a=3) { cout << "NO"; } else if(a=5) { cout << "NO"; } else if { cout << "YES"; } } else { cout << "NO"; } return 0; }
Main.cc: In function 'int main()':
Main.cc:6:10: warning: comparison of constant '7' with boolean expression is always true [-Wbool-compare]
if (1<=a<=7) {
^
Main.cc:6:7: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
if (1<=a<=7) {
^
Main.cc:7:10: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (a=1) {
^
Main.cc:9:16: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
} else if(a=3) {
^
Main.cc:11:16: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
} else if(a=5) {
^
Main.cc:13:13: error: expected '(' before '{' token
} else if {
^