rounding decimal to nearest integer
Posted: Thu Aug 06, 2009 3:36 pm
Hi,
I have a problem with the value of my variable. This variable is supposed to be discrete. As a result of the equation used in this variable, I got decimal values. I tried to use INTEGER but it does not return the value that I required. Example:
X= 3.155, INTEGER (X)= 2
Y= 3.985, INTEGER (Y)= 3
The values that I need are:
X= 3
Y= 4
Do you have any suggestion on this? Many thanks..
I have a problem with the value of my variable. This variable is supposed to be discrete. As a result of the equation used in this variable, I got decimal values. I tried to use INTEGER but it does not return the value that I required. Example:
X= 3.155, INTEGER (X)= 2
Y= 3.985, INTEGER (Y)= 3
The values that I need are:
X= 3
Y= 4
Do you have any suggestion on this? Many thanks..