This should be relatively simple.
What I have:
int progress; // iteration we are on, starts at 0, always incr by 1
int percentage; // from 1 - 100, starts at 0
int percentage_trip; // derived from total_results / 100
int total_results; // lets say its 200 (note that it can be anything, like 939049)
What I need:
In the above example, each time progress hits 2, 4, 6, 8 etc, the percentage integer should be incremented by 1 (ie, percentage++;)
My ideas have revolved around terribly formatted nested IF statements and I am looking for the proper way of doing this.
1 Answer