I\'m trying to divide two integers and multiply by 100 but it keeps giving only 0 or 100. Can someone help me?
int x= (a/b)*100;
if a w
This sounds like you are not correctly typing your variables; two integer divisions result in an integer, not a float or double. For example:
(int)3 / (int)5 = 0 (float)3 / (float)5 = 0.6