| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 143637 | 余建成 | 判断质数(使用while循环) | C++ | Compile Error | 0 MS | 0 KB | 260 | 2026-01-17 11:58:51 |
#include<iostream> using namespace std; int main() { int i,n; bool flag=0; cin>>n; i=2; while(i<n) { if(n%i==o) { flag=1 break; } i++ } if(flag==0) cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:11:12: error: 'o' was not declared in this scope
if(n%i==o)
^
Main.cc:14:6: error: expected ';' before 'break'
break;
^
Main.cc:17:2: error: expected ';' before '}' token
}
^