Run ID:68067
提交时间:2024-03-18 20:55:13
#include<iostream> using namespace std; int main() { int a,i; bool j=true; cin>>a; for(i=2;i<a;i++) { if(a%i==0) { j=false; break; } } if(j==true) { cout<<"是素数"; } else { cout<<"不是素数"; } return 0; }