答案

朱子相  •  10个月前


#include<iostream> #include<iomanip> using namespace std; int main() { int n,c = 0; cin>>n; for(int i=1;i<=n;i++){ if(n % i == 0){ c++; } } if(c == 2){ cout<<"prime"; }else{ cout<<"not prime"; return 0; } }


评论: