[center:6f6709b5e6]32
[/center:6f6709b5e6]
اين كد منه اما وقتي submit ميزنم ، ميزنه 1 wrong answe on test one!!!!!!!!
کد
#include <stdio.h>
#include <conio.h>
#include <math.h>
long int isprime(long int k)
{
int flag=1;
for(int i=2;i<=sqrt(k)&&flag==1;i++)
if(k%i==0)
flag=0;
return flag;
}
long int fk(long int a)
{
int count=0;
for(int k=2;k<=a/2;k++)
if(a%k==0&&isprime(k)==1)
count++;
return count;
}
int main()
{
int r=0,n;
scanf("%d",&n);
int a[n];
for(int j=1;j<=n;j++)
{
int b;
scanf("\n%d",&b);
a[r]=b;
r++;
}
for(int y=0;y<n;y++)
{
if(fk(a[y])==2)
printf("\nYes");
else
printf("\nNo");
}
}