We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
i have been getting a strange problem with a particular math operation...
i have two long variables.. long a = 31534; long b = 102004; float c;
c = a / b;
now i get the value of c as 0..wat clould be the problem...i also tried typecasting the expression to float..but still didnt work...
"i also tried typecasting the expression to float."
Cast an operand, not the expression:
c = (float)a / b;