Increase in one value related to another value

I want to make program in which when the menu to select battery is ON. The life of battery starts increasing.

Can someone tell me how to do this ? how to increase the number in battery.
if (batteryOn)battery++;
Topic archived. No new replies allowed.