Other Programs/Analyzing gambling strategies/martingale.c
int gamble(int bet)
{
	coinToss = rand() % 2;

	//printf("%s\n", coinToss == 1 ? "Win" : "Lose"); // Test line

	if (coinToss == 0)
		return -1; // Lost
	else
		return 1; // Won
}
// Simulates a gambling game with 50% win rate.
Simulates a gambling game with 50% win rate.
Simulates a gambling game with 50% win rate .
int gamble(int bet)
{
	coinToss = rand() % 2;
	if (coinToss == 0)
		return -1; 
	else
		return 1; 
}
int gamble ( int bet ) { coinToss = rand ( ) % 2 ; if ( coinToss == 0 ) return -1 ; else return 1 ; }
Simulates a gambling game with 50% win rate.
Simulates a gambling game with 50% win rate .
//printf("%s\n", coinToss == 1 ? "Win" : "Lose"); // Test line // Lost // Won