Getting problem in the code !!!!! (PRB01)

#include
using namespace std;

int prime_or_not(int num)
{
for(int i=2;i<num;i++)
{
if(num%i==0)
return 0;
}
return 1;
}

int main() {
// your code goes here
int tc;
cin>>tc;
while(tc–)
{ int numb;
cin>>numb;
if(prime_or_not(numb))
cout<<“yes”;
else
cout<<“no”;
cout<<endl;
}
return 0;
}
showing that the submitted answer is wrong but when I run it seems to be correct

1 is not a prime number.

1 Like