My codes are running perfectly fine on VS code and i am recieving the correct output too but it is still telling me i am wrong somewhere i am facing this issue in all my challenges. i am putting my code too:-
#include
using namespace std;
int main(){
//Chceck if a given number is Prime
int n;
cin>>n;
int i;
for(i=2; i<=n-1; i++){
if(n%i==0){
cout<<"N Prime "<<endl;
break;
}
}
//Remember this check is important
if(i==n){
cout<<"Prime"<<endl;
}
return 0;
}