Which of the following will display $8.00, $8.50, $9.00, and $9.50 in message boxes?a. For decDollars As Decimal = 8 To 9.5 Step 0.05MessageBox.Show(decDollars.ToString("C2"))Next decDollarsb. For dblDollars As Double = 8 To 9.5 Step 0.5MessageBox.Show(dblDollars.ToString("C2"))Next dblDollarsc. For strDollars As String = "$8.00" To "$9.50" Step "0.5"MessageBox.Show(strDollars)Next strDollarsd. both b and c

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter3: Coding With Variables, Named Constants, And Calculations
Section: Chapter Questions
Problem 11RQ: Which of the following declares a procedure-level String variable? a. Dim String strCity b. Dim...
icon
Related questions
Question

Which of the following will display $8.00, $8.50, $9.00, and $9.50 in message boxes?
a. For decDollars As Decimal = 8 To 9.5 Step 0.05
MessageBox.Show(decDollars.ToString("C2"))
Next decDollars
b. For dblDollars As Double = 8 To 9.5 Step 0.5
MessageBox.Show(dblDollars.ToString("C2"))
Next dblDollars
c. For strDollars As String = "$8.00" To "$9.50" Step "0.5"
MessageBox.Show(strDollars)
Next strDollars
d. both b and c

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning