+ 1

# is it casting or what

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

1 Answer

+ 4

Yes, that converts the 1 into double before performing the computation.

+ 1

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

1 Answer

+ 4

Yes, that converts the 1 into double before performing the computation.