Prime Number doubt

#include
using namespace std;
int main(){
int N;
bool flag = true;

cin>>N;

for(int i = 2; i <= N / 2; i++) {
if(N % i == 0) {
flag = false;
break;
}
}
if (flag==true)
cout<<" prime “;
else
cout<<” not prime ";
return 0;
}

This code is compiling successfully but when i submit it ,it is showing 0 marks and all test cases fails. Why this is happening?

if (flag==true)
cout<<“Prime”;
else
cout<<“Not Prime”;

capital P and N
if this solves your doubt ,please mark it as resolved :slight_smile:

Now also it is showing 0 marks

you must have spaces befre/after Prime

copy this exactly and u ll pass all the test case

also if u did unlock the editorial/testcases you will get 0 score even if u pass all the test cases

Thankyou Ma’am , Now I got 100 marks.

great, if this solves your doubt ,please mark it as resolved :slight_smile: