Quote:
Originally Posted by fysiks
Yes, it's called division.
No, that is incorrect for two reasons. First, to get the percentage of the total progress, you simply divide the actual value by the total value (cProgress/Total)*100.
The other thing is that you're using integers so you are doing integer division which will means that cProgress / Total will always result in 0 provided that cProgress is less than Total.
To be able to do this, you need to convert to floating point values before doing the division. Alternatively, if you don't need the full precision, you can use integer division but you need to multiply cProgress by 100 first and then divide by Total: (cProgress * 100) / Total. This will effectively be the truncated value of the method using floating point values.

Corrected. I just went about settings float points all around.
Though the alternative point can do the job. I am not sure how precise the OP wants it.