test case 1 is failing my code is
#include
using namespace std;
int main() {
int n,i=2,c;
cin>>n;
while(i<=n/2)
{
if (n%i==0)
{c=1;
break;}
i=i+1;
}
if (c==1 )
{cout<<“Prime”;}
else
{cout<<“Not Prime”;}
return 0;
}
test case 1 is failing my code is
#include
using namespace std;
int main() {
int n,i=2,c;
cin>>n;
while(i<=n/2)
{
if (n%i==0)
{c=1;
break;}
i=i+1;
}
if (c==1 )
{cout<<“Prime”;}
else
{cout<<“Not Prime”;}
return 0;
}