Ask Question

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?

+3
Answers (1)
  1. 6 April, 18:44
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers