10.6k views
3 votes
Which of the following expressions evaluate to 3.5 ?

I. (double) 2 / 4 + 3
II. (double) (2 / 4) + 3
III. (double) (2 / 4 + 3)
(A) I only
(B) III only
(C) I and II only
(D) II and III only
(E) I, II, and III

User Orchid
by
7.8k points

1 Answer

3 votes

Final answer:

After evaluating each expression, it's clear that expressions I, II, and III each evaluate to 3.5. The correct answer to the question is (E) I, II, and III.

Step-by-step explanation:

The question asks which of the following expressions evaluate to 3.5:

  1. (double) 2 / 4 + 3
  2. (double) (2 / 4) + 3
  3. (double) (2 / 4 + 3)

Let's evaluate each expression:

  1. Expression I: (double) 2 / 4 + 3 = 0.5(double) + 3 = 0.5 + 3 = 3.5
  2. Expression II: (double) (2 / 4) + 3 = (double) (0.5) + 3 = 0.5 + 3 = 3.5
  3. Expression III: (double) (2 / 4 + 3) = (double) (0.5 + 3) = (double) 3.5 = 3.5

Each expression: I, II, and III evaluates to 3.5. Therefore, the correct answer is (E) I, II, and III.

User Tony Breyal
by
9.0k points

No related questions found

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