Computer Science, asked by rmfaze, 1 month ago

What will be the output if double d=5 ; int a=2 ; int p=6 ; [2]
( d / a ) * 4 / p) ;

Answers

Answered by ItzMeSam35
2

Possibly lossy conversation from double to int

double d = 5;

int a = 2;

int p = 6;

( d / a ) * ( 4 / p ) ;

= ( 5.0 / 2 ) * ( 4 / 6 )

= 2.5 * 0.666666666666

= 1.6666666666666

Similar questions