ADD file via upload

master
pbqa92cj6 3 years ago
parent 290bd40d2e
commit bbbaba2f77

@ -0,0 +1,39 @@
#include<stdio.h>
#include<math.h>
int judge(int m)
{
int i,count=0;
if(m<2)
{
return 0;
}
for(i=2;i<=sqrt(m);i++)
{
if(m%i==0)
{
count++;
}
}
if(count==0)
{
return 1;
}
else
{
return 0;
}
}
int main()
{
int n;
scanf("%d",&n);
if(judge(n)==1)
{
printf("Yes");
}
else
{
printf("No");
}
return 0;
}
Loading…
Cancel
Save