ho provato a mettere anche

system("pause");
return(0);

uguale