Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
92894 | 罗迎甲 | 判断质数(使用while循环) | C++ | Compile Error | 0 MS | 0 KB | 230 | 2024-10-06 18:02:27 |
#include<bits/stdc++.h> using namespace std; int main() { int n,i=2; bool flag=0; cin>>n; while(i<n){ if(n%i==0){ flag=1; break; } i++; } if(fiag==0)cout<<"Yes"; elsecout<<"No"; return 0; }
Main.cc: In function 'int main()': Main.cc:15:5: error: 'fiag' was not declared in this scope if(fiag==0)cout<<"Yes"; ^ Main.cc:16:2: error: 'elsecout' was not declared in this scope elsecout<<"No"; ^