Computer Science, asked by ashishsharma471, 10 months ago

int x = 5;
double d1 = 11/x;
double d2 = 11/(double)x;
what is the value of d1-d2

Answers

Answered by Almas0149
0

d1 = 11/5 = 2.2

d2= 11/5.0 =2.2

So, d1-d2 = 2.2 - 2.2 = 0

So, the value of d1-d2 is 0.

Hope it helps....

Similar questions