213k views
1 vote
Which expression does not evaluate to 0.6?

1) 6.0 / 10
2) (int)6.5 / (double)10
3) 6 / 10.0
4) (double) (6 / 10)

1 Answer

6 votes

Final answer:

The expression that does not evaluate to 0.6 is option 4) (double) (6 / 10).

Step-by-step explanation:

The expression that does not evaluate to 0.6 is 4) (double) (6 / 10).

To evaluate each expression:

  1. 1) 6.0 / 10 = 0.6
  2. 2) (int)6.5 / (double)10 = 0.65
  3. 3) 6 / 10.0 = 0.6
  4. 4) (double) (6 / 10) = (double) (0) = 0.0

From the above step-by-step evaluation, we can see that option 4) does not evaluate to 0.6, but instead evaluates to 0.0.

User Ivan Bravo Carlos
by
8.9k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.