Question: there any message box? any nested if? explain the following program: what is it all about? Is there any case-structure, is Any constant? Private Sub
there any message box? any nested if? explain the following program: what is it all about? Is there any case-structure, is Any constant? Private Sub btncale ClickCsender As Object, e As EventArgs) Handles btnCalc.click calculates and displays the total due Const intPRICE As Integer-10 Const decDISCS As Dec Ima -0.0 Const decDISC7 As Decimal-0.0 Dim intCds As Integer Din decSubtotal As Decima Dim decDi scount As Decimal Oin decTotalDue As Decisal Integer.TryParseCtxtCds. Text. intcds) calculate subtotal decSubtotal - intCdsintPRICE calculate discount, if necessary If intCds 10 Then decDiscount-decSubtota1 decDTSC7 If intCds>5 Then End If E1se you need to test both selection structures decDscount decSubtotal decDISCs End If calculate and display total due decTotalDue decSubtotal - decDiscount 1b1 TotalDue.Text - decTotalDue.ToStringC2) End Sub Private Sub txtCds _KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtCds.KeyPress allows the text box to accept only nunbers and the Backspace key If (e.KeyChar"O" OrElse e.KeyChar9 Anda1 so e. KeyChar >ControlChars.Back Then e.Handled True End If End Sub
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
