What is wrong in my code ?(it is showing 9 to be a prime number)

#include
using namespace std;
int main() {

int N ;
cin>>N;

int x = 2 ;

int M ;
M = ( N%x ) ;

while( x<N ) {
if( M==0 ){
cout<<“Number is not prime” ;
break ;
}
x = x + 1 ;
}

if(x==N){
cout<<“Number is a prime” ;
}

if (N==2){
cout<<“Number is a prime”;
}
return 0;
}

I have edited your code, kindly try to submit now,