+ 1

is it casting or what

double rst=0.0 rst = rst + (double) 1 / i;

30th Mar 2017, 2:07 PM
ALAMOUDI, WAEL MAKKI S
ALAMOUDI, WAEL MAKKI S - avatar
1 Answer
+ 4
Yes, that converts the 1 into double before performing the computation.
30th Mar 2017, 3:02 PM
Álvaro