My issue
in this problem, i am supposed to determine wheather the given number is prime or not.
when i am running it i am getting the correct output, but when i am submitting, it is showing wrong answer. whats wrong with my code below.
My code
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t; cout<<endl;
while(t--){
int n;
int count=0;
cin>>n; cout<<endl;
if(n%2!=0 && n%3!=0) cout<<"yes"<<endl;
else cout<<"no"<<endl;
}
return 0;
}
Problem Link: PRB01 Problem - CodeChef