This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

floating point

Hi every body

I don't know why I don't have the float
part of the temp var.


float temp;
int H_Value;
int L_Value;
int value = 55;

temp = value / 10;
H_Value = (int)temp;
L_Value = (int)(temp - H_value)*10;


the value int temp is 5 and not 5.5

Thanks Kobi

Parents Reply Children
No data