Magesh Srinivasulu February 2016
precision error in output
double x = 9/2
//x == 4.0?
The output should be 4.5, but is 4.0
What would be the mistake I made?
user3659052 February 2016
9/2 <- without decimal you are specify this as a
9.0 / 2.0 <- this is now
double and you should able to get 4.5
Asked in February 2016
Viewed 3,936 times
Answered 1 times
Leave an answer
Quote of the day: live life