Fellow! I'm stuck here. Currently, all this code right now doing is basically letter the user enter the damage and subtracting 5. Moreover, when it comes back to the loop, it asks me to enter in another damage. My problem is that i'm trying use the previous damage value too and subtract it by 5. For instance, I enter in Damage: 125. Total health remaining: 120. It asks me again for damage: 10. Total health: 5. I'm trying to save the total damage value from the first cycle and when I enter in another damage value, I want it to do "120-10-5." I'm a beginner here, so can anyone please give me a basic solution to this. :)
I'm not sure how you want to set up the damage thing, but if your goal is to get something like "120-10-5", then I'd try something like this:
1 2 3 4 5
health = health - damage;//so if the starting health was 120,
//and the damage was 10 the first round and 10 the second round,
//the health would be 120-10-10 = 100;
In general, you want to be changing and outputting the variable "health", not "damage".