Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 6, Problem 23RQ
Program Description Answer
The statement dblSales = Math.Round(dblSales,2) rounds the contents of the “dblSales” variable to two decimal places.
Hence, the correct answer is option “A”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Which of the following statements increments the decTotal variable’s value by the value stored in the decBonus variable?
a. decBonus += decTotal
b. decBonus =+ decTotal
c. decTotal += decBonus
d. decTotal =+ decBonus
Which of the following statements formats the contents of the dblNet variable with a dollar sign and two decimal places?
a. lblNet.Text = dblNet.ToCurrency("C2")
b. lblNet.Text = dblNet.ToString("C2")
c. lblNet.Text = ToString(dblNet , "C2")
d. lblNet.Text = dblNet.ToFormat("C2")
Which of the following conditions determines whether the number in the intNum variable is less than 0 or greater than 1000?a. intNum < 0 AndAlso intNum > 1000b. intNum < 0 OrElse intNum > 1000c. intNum < 0 AndAlso > 1000d. intNum < 0 OrElse > 1000
Chapter 6 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 6 - Prob. 1RQCh. 6 - Prob. 2RQCh. 6 - Prob. 3RQCh. 6 - Prob. 6RQCh. 6 - Prob. 7RQCh. 6 - Prob. 8RQCh. 6 - Which of the following instructs a function to...Ch. 6 - Prob. 10RQCh. 6 - Which of the following is a valid header for a...Ch. 6 - Prob. 14RQ
Ch. 6 - The memory locations listed in a procedure...Ch. 6 - Prob. 16RQCh. 6 - Prob. 17RQCh. 6 - The items in a combo box belong to which...Ch. 6 - Prob. 19RQCh. 6 - Prob. 20RQCh. 6 - Prob. 21RQCh. 6 - Prob. 22RQCh. 6 - Prob. 23RQCh. 6 - Prob. 24RQCh. 6 - Prob. 25RQCh. 6 - Prob. 1ECh. 6 - Prob. 3ECh. 6 - The Donut Shoppe sells four varieties of...Ch. 6 - Prob. 8ECh. 6 - Prob. 11E
Knowledge Booster
Similar questions
- Which of the following declares a procedure-level String variable? a. Dim String strCity b. Dim strCity As String c. Private strCity As String d. Both b and c.arrow_forwardWhich of the following is a valid header for a procedure that is passed the number 15? a. Private Function GetTax(ByVal intRate As Integer) As Decimal b. Private Function GetTax(ByAdd intRate As Integer) As Decimal c. Private Sub CalcTax(ByVal intRate As Integer) d. Both a and c.arrow_forwardWhich of the following expressions evaluates to True when the strItem variable contains the string 1234Y5? a. strItem Like ####[A-Z]# b. strItem Like 9999 [A-Z] 9 c. strItem Like ###### d. None of the above.arrow_forward
- Which of the following C# expressions means, If itemNumber is not 8 or 9, add TAX to price? If(itemNumber !=8 || itemNumber !=9) price = price + Tax; If(itemNumber ! = 8 If(itemNumber ! = 8 Two of thesearrow_forwardWhich of the following statements is equivalent to the statement dblTotal = dblRate dblTotal? a. dblTotal = dblRate b. dblTotal = dblRate c. dblRate = dblTotal d. dblRate = dblTotalarrow_forwardWhich of the following expressions assigns true to a Boolean variable named islDValid when idNumber is both greater than 1000 and less than or equal to 9999, or else is equal to 123456? isIDValid=(idNumber1000idNumber=9999idNumber==123456) isIDValid=(idNumber1000idNumber=9999idNumber==123456) isIDValid=((idNumber1000idNumber=9999)idNumber==123456) two of thesearrow_forward
- Which of the following expressions evaluates to True when the strItem variable contains the string “1234Y5”? a. strItem Like "####[A-Z]#" b. strItem Like "9999[A-Z]9" c. strItem Like "######" d. None of the above.arrow_forwardWhich of the following statements adds the number stored in the decPrice variable to the number stored in the decSubtotal variable, and then assigns the result to the decSubtotal variable? a. decSubtotal =+ decPrice b. decPrice =+ decSubtotal c. decSubtotal += decPrice d. decPrice += decSubtotalarrow_forwardWhich of the following methods can be used to determine whether the strRate variable contains the percent sign? a. blnResult = strRate.Contains("%") b. intResult = strRate.IndexOf("%") c. intResult = strRate.IndexOf("%", 0) d. All of the above.arrow_forward
- Which of the following assigns the number of characters in the strAddress variable to the intNum variable? a. intNum = strAddress.Length b. intNum = strAddress.LengthOf c. intNum = Length(strAddress) d. intNum = LengthOf(strAddress)arrow_forwardWhich of the following statements is equivalent to the statement dblTotal = dblRate * dblTotal? a. dblTotal =* dblRate b. dblTotal *= dblRate c. dblRate *= dblTotal d. dblRate =* dblTotalarrow_forwardWhich of the following statements decreases the intNum variable’s value by 5? a. intNum = intNum – 5 b. intNum –= 5 c. intNum = intNum + –5 d. all of the abovearrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,