Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
103671 张瑞宇 判断素数 C++ Compile Error 0 MS 0 KB 486 2024-12-29 14:43:33

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int i,m; cin>>m; for(i=2;i<=m-1;i++) { if(m%i==0) { cout<<"not prime"; break; } } if(i==n) { cout<<"prime"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:19:11: error: 'n' was not declared in this scope
     if(i==n)
           ^