Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
97671 何松羽 素数判断 C++ Compile Error 0 MS 0 KB 329 2024-11-16 12:05:36

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a=1; for(int i=2;i<=n-1;i++){ if(n%i==0){ // cout<<i<<endl; // cout<<n<<"不是质数"<<endl; a=0; break; } } if(a==0){ cout<<n<<prime<<endl; } else{cout<<n<<"not prime"<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:17:15: error: 'prime' was not declared in this scope
      cout<