Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138841 傅小轩 判断质数(使用while循环) C++ Compile Error 0 MS 0 KB 249 2025-11-30 11:27:11

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { bool f=1; int n,i=2; cin>>n; while(i<n){ if(n%i==0){ f=0 } i++; } if(f==0){ cout<<"No" }else{ cout<<"Yes" } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:5: error: expected ';' before '}' token
     }
     ^
Main.cc:15:2: error: expected ';' before '}' token
  }else{
  ^
Main.cc:17:2: error: expected ';' before '}' token
  }
  ^