Not passing one of the testcases

#include
using namespace std;
int main() {
int N;
cin>>N;

int no;


if(N>2&&N<=1000000000){
	
	
	
		for(no=3;no<N;no++){
		if(N%no==0){
			cout<<"Not prime";
			break;
		}
		
	}
	
		if(no==N){
			cout<<"Prime";
		}
	
}
else{
	cout<<"invalid";
}

cout<<endl;

return 0;
}

LINK FOR THE PROBLEM= https://online.codingblocks.com/app/player/246132/content/235743/4775/code-challenge

hi @sbhardwaj1be21_2a991b329433c059 updated https://ide.codingblocks.com/s/666786

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

1 Like