Ask your own question, for FREE!
Computer Science 14 Online
SourMunchkin7806:

What is the value of the variable? double dNum = (int)2.5 * 3;

SourMunchkin7806:

So since this is a double...would it be 7.5?

Ultrilliam:

No, in this case, the decimal is converted to a int, so it's 2*3

SourMunchkin7806:

so its 6?

Ultrilliam:

6.0, technically. Since it's a double

SourMunchkin7806:

Ok

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!