int die = 0; int money = 100; void setup() { for(int c = 0; c < 10; c = c+1) { money = money - 10; // make a bet die = (int)(1 + random(6)); println(die); if(die == 6) { println("WINNER"); money = money + 60; // win money } else { println("You lose..."); } } println("You ended with Euros " + money); } |