It depends on what exactly you want... Your question is very vague and can have a whole slu of answers. But, here's my stab at it.
You need a variable for the total amount won, and a variable for the wager. Roll the dice and if the user won, add the wager*2 to the total won.
Without specifics I can't really give you example code or anything, sorry.