Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6007 詹梓涵 判断质数(使用while循环) C++ Compile Error 0 MS 0 KB 434 2024-12-28 09:28:35

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 n; cin>>n; int i=2; while(i*i,=n){//i<=sqrt(n) if(n%i==0) {cout<<"No"<<endl;return 0; i++; } cout<<"Yes"<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:15: error: expected primary-expression before '=' token
     while(i*i,=n){//i<=sqrt(n)
               ^
Main.cc:16:1: error: expected '}' at end of input
 }
 ^