I\'m currently coding a little download manager and I get a funny output when I try to calculate the download-progress in percent. This is what i use to calculate it:
21476160 * 100 = 2 147 616 000 is greater than 2 147 483 647, the max int.
21476160 * 100 = 2 147 616 000
2 147 483 647
You're overflowing.
Use long for your calculations.
long