Here's an interesting little scenario. You get challenged to a game of coin toss. Both players pick a sequence of coin toss results (heads or tails). The coin is repeatedly tossed until the sequence for one of the players occurs. The loser pays the winner a dollar. You'd assume that you each have an equal chance of winning. However, using two little "tricks" you can tip the odds in your favour. The first trick is to always choose second. If you can manage this then your strategy is as follows: Your first choice should be the opposite of your opponent's … +0 after the 1st iteration the toss is 100 and then the iteration increases toss to 200 and then 300. Why is this happening i want toss to be made only hundred times. PLease help me. #include using namespace std; #include #include int toss(void); int main(void) { srand(time(0)); int headcount=0; int tailcount=0; char ht; loop:cout<<"press h for calling out head"<>ht; if(ht=='h'||ht=='t') { for(int i=0;i<100;i++) { int k=toss(); if(k==0) { cout<<"heads"< #include int main(int argc, char *argv[]) { using namespace std; double purchaseAmount; double paidAmount; float balance; int change, quarters, dimes, nickels, pennies, tenDollar, fiveDollar; // declare variables cout << "Enter Total purchased amount" << endl; cin >> purchaseAmount; cout << "Enter Total paid amount" << endl; cin >> paidAmount; balance = paidAmount - purchaseAmount ; tenDollar = balance / 10; // calculate the number of Ten Dollars change = tenDollar % 10 ; // calculate the change needed change = balance * 100; quarters = change / 25; // … +0 This is the famous counterfeit coin game in C++. # include # include # include # include # define coinVal 2; using namespace std; void gameInfo(); void generateGame(); void playGame(); int coins, counterfeitCoin; char typeOfCounterfeit; int main() { gameInfo(); generateGame(); } void gameInfo() { cout<<" Enter number coins(max 12) : "; cin>>coins; cout<<" Press (H) for heavy counterfeit and (L) for light : "; cin>>typeOfCounterfeit; } void playGame(int coinTab[]) { cout<<"\n You will get 3 chance to identify the 'bad' coin "; int pan1, pan2, sum1=0, sum2=0, answer; for(int i=0 ; i<3 ; i++) { cout<<"\n … +0

The End.