100 people standing in a circle in an order 1 to 100. No. 1 has a sword. He kills the next person (i.e. No. 2) and gives the sword to the next (i.e. No. 3). All people do the same until only 1 survives. Which number survives at the last? I want C++ program for this.
There are 2 piles of stones; one has 30 stones and the other 20 stones. Players take turns to remove as many stones as they please from any one of the piles. The player who removes the last stone wins. Who wins if two people are playing this game?