The dragon thinks of a random number between 1 and 10; bet what you like and you try to guess the number. If you guess correctly, the winnings will go up by the amount of your bet; guess incorrectly, and your bet gets added to losses. The program will keep repeating indefinitely.