Prime number check programme doubt

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;
}

@Sheenagoyal21
I highly recommend you to stop using TurboC++ for any and all purposes and switch to better IDEs like Code::Blocks , Visual Studio or Sublime Text Editor as you are already using for practicing and writing codes. The reason for this is that TurboC++ is a very old compiler which was outdated in 1980s … outdated in the 80s. It uses old C++ standards and does not provide nearly 1/10th of the functionality provided by these other modern IDEs.
The problem you are facing is because of this reason only , your code works as per older C++ standards hence it does not give you any problem in TurboC++ but reports an error as per modern C++ standards. Hence Sublime Text 3 reports this code as invalid.
Uninstall TurboC++ altogether as it is useless. It was only good for 11th 12th coding.
You can also try Coding Blocks IDE ( ide.codingblocks.com ) as it works as per latest C++ standards.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.