Possible Duplicate:
C programming division
probably my question is very simple and stupid.
I would like to store the value of a division, in particular 1 / x
where x
is a
integer value.
int x = 17;
double result = 1/x;
I try to do it but I always get 0.000000 ...
I try to enter a value fixed in x, for example 1/17
but always get the same value .. what's Wrong?