Hi i am making a calculator for a game i play but i cant figure out how to calculate it down to what i need
i have 2 text fields (troop number) and i put in a number say 1 into the first and 5 into the second text field(time reducer). 1 troop takes 5400 seconds so i times the number of troops by 5400 and that gives me the time and each time reducer reduces that time by 30% so if i have 1 it does 5400 - 30% then takes that total and minuses it by 30% etc 5 times
what i cant figure out is how i can make it get the total of the first -30% and then -30% from that total then take that total and minus it by 30%
i tried a while loop but this doesn't work
while (timeReducer > 0) totalTime = trooptime * 0.7; timeReducer--;
because it loops around and does the trooptime again instead of using the total time in the next calculation.....any ideas how i could make it so i could use the totaltime on the second calculation instead of the trooptime?
thanks for any advice you can give