Ask Question
29 June, 17:36

If dblMiles > = 500 Then

dblMiles = dblMiles * 0.45

Else

dblMiles = dblMiles * 0.25

End If

The dblMiles variable contains the number 575 before the code above is processed. What value will be in the variable after the code is processed?

+2
Answers (1)
  1. 29 June, 18:19
    0
    225

    Explanation:

    The given codes contain an if-else block. If the dblMiles bigger than or equal to 500, the dblMiles will be multiplied with 0.45 or else multiplied with 0.25.

    If the initial value of dblMiles is 575, the expression dblMiles >=500 will be evaluated to true and if block statement dblMiles = dblMiles * 0.45 will be executed and the 575 * 0.45 = 258.75

    The value of 258.75 will be assigned to dblMiles to overwrite the previous value.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “If dblMiles > = 500 Then dblMiles = dblMiles * 0.45 Else dblMiles = dblMiles * 0.25 End If The dblMiles variable contains the number 575 ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers