0% found this document useful (0 votes)
41 views2 pages

Práctica 3

This document describes a program that calculates the total payment for a package based on the quantity and discount amount. The program allows the user to enter the package number, quantity, discount percentage, and then calculates the subtotal, applies the discount, and displays the total payment amount in text boxes. It also includes buttons to clear the text boxes and close the program.

Uploaded by

jd3_orozco7776
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views2 pages

Práctica 3

This document describes a program that calculates the total payment for a package based on the quantity and discount amount. The program allows the user to enter the package number, quantity, discount percentage, and then calculates the subtotal, applies the discount, and displays the total payment amount in text boxes. It also includes buttons to clear the text boxes and close the program.

Uploaded by

jd3_orozco7776
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

PROGRAMA PARA CALCULAR EL TOTAL A PAGAR DE UN PAQUETE, DE ACUERDO CON LA CANTIDAD Y EL DESCUENTO.

Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim nopaquete, cantidad, subtotal, descuento, total As Integer nopaquete = TextBox1.Text Select Case (nopaquete) Case 1 nopaquete = 20 Case 2 nopaquete = 30 Case 3 nopaquete = 40 End Select cantidad = TextBox2.Text subtotal = (nopaquete * cantidad) TextBox3.Text = subtotal descuento = TextBox4.Text total = subtotal - ((descuento * subtotal) / 100) TextBox5.Text = total End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() TextBox5.Clear() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Close() End Sub End Class

You might also like