Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions