Código:
int main()
{
srand(time(NULL));
cout << "cuanta veces deseas lanzar la moneda" << endl;
cin >> n;
for (i=0; i<n;i++)
cout << rand()%2 <<endl;
if ((rand()%2)==0)
{cara++;}
if((rand()%2)==1)
{cruz++;}
cout << "cara\n" << cara <<endl;
cout << "cruz\n" << cruz <<endl;
cout <<endl;
system ("pause");
return 0;
}