Design will be critical for this problem. There are a number of different cases to account for. Don't try to deal with all of them at once. Get one case working, then add others. Three large dice are tumbled over and over in a cage until they come to rest face up.
Players make bets that any particular number or total well show on the three dice.
The house pays 30 to 1. A particular total , from 4 to 17. Your program should simulate n games, where the user enters the number of games to play. For each game, accept the user's bet. Strive for a structured, easily read program.