You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include <iostream>
|
|
|
|
|
#include <cmath>
|
|
|
|
|
#include "Prime.h"
|
|
|
|
|
|
|
|
|
|
bool Prime::Judge(int num) {
|
|
|
|
|
if(num<=1) {
|
|
|
|
|
cout<<num<<"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"<<endl;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
for(int i=2;i<sqrt(num);i++) {
|
|
|
|
|
if((num%i)==0) {
|
|
|
|
|
cout<<num<<"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"<<endl;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
cout<<num<<"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"<<endl;
|
|
|
|
|
return true;
|
|
|
|
|
}
|