Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
115604 谭哲曦 13判断质数 C++ Compile Error 0 MS 0 KB 293 2025-03-31 21:45:42

Tests(0/0):


Code:

#include<iostream> using namespace std; int main() { int n,i; bool flag=true; cin>>n; for(i=2;i<n;i++) { if(n%i==0){fla=false;} else{flag=True} } if(flag) cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:20: error: 'fla' was not declared in this scope
         if(n%i==0){fla=false;}
                    ^
Main.cc:11:19: error: 'True' was not declared in this scope
         else{flag=True}
                   ^