This document contains the code for a program that calculates phone call charges. It takes the call duration in minutes from a text box, calculates the base charge using different rates for various duration ranges, applies additional surcharges if certain radio buttons are selected, and displays the total charge in a label. It also contains a button click event that clears all fields and resets the form.
This document contains the code for a program that calculates phone call charges. It takes the call duration in minutes from a text box, calculates the base charge using different rates for various duration ranges, applies additional surcharges if certain radio buttons are selected, and displays the total charge in a label. It also contains a button click event that clears all fields and resets the form.
This document contains the code for a program that calculates phone call charges. It takes the call duration in minutes from a text box, calculates the base charge using different rates for various duration ranges, applies additional surcharges if certain radio buttons are selected, and displays the total charge in a label. It also contains a button click event that clears all fields and resets the form.
This document contains the code for a program that calculates phone call charges. It takes the call duration in minutes from a text box, calculates the base charge using different rates for various duration ranges, applies additional surcharges if certain radio buttons are selected, and displays the total charge in a label. It also contains a button click event that clears all fields and resets the form.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Label3.Visible = True Dim a, b, c As Double If (Val(TextBox1.Text) <= 5) Then a = Val(TextBox1.Text) Else If (Val(TextBox1.Text) <= 8) Then a = ((Val(TextBox1.Text) - 5) * 0.8) + 5 Else If (Val(TextBox1.Text) <= 10) Then a = ((Val(TextBox1.Text) - 8) * 0.7) + 7.4 Else If (Val(TextBox1.Text) > 10) Then a = ((Val(TextBox1.Text) - 10) * 0.5) + 8.8 End If End If End If End If If (RadioButton1.Checked = True) Then b = a * 1 Label3.Visible = True Label3.Text = "EL MONTO A PAGAR´POR LA LLAMADA ES " & b & " PESOS" Else If (RadioButton2.Checked = True) Then b = a End If End If If (RadioButton3.Checked = True) Then c = b * 1.15 Label3.Visible = True Label3.Text = "EL MONTO A PAGAR´POR LA LLAMADA ES " & c & " PESOS" Else If (RadioButton4.Checked = True) Then c = b * 1.1 Label3.Visible = True Label3.Text = "EL MONTO A PAGAR´POR LA LLAMADA ES " & c & " PESOS" End If End If End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles