To check if a number is prime or not i tried it like this but in sublime text 3 it is showing errors in this program but in turbo c++ this program is giving no error and giving the desired output. please explain why is this happening?
#include
using namespace std;
int main()
{
int a,i;
cout<<“enter a number”;
cin>>a;
for(i=2;i<=a-1;i++)
{
if(a%i==0)
{
cout<<“entered no. is not prime”;
goto end;
}
else
{
goto start;
}
start:
}
cout<<"Entered no. is prime";
end:
return 0;
}