Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim nombre As String
Dim sueldo As Decimal
Dim ventas As Decimal
Dim salario As Decimal
Dim pension As Decimal
Dim salud As Decimal
Dim comision As Decimal
nombre = TextBox1.Text
sueldo = TextBox2.Text
ventas = TextBox3.Text
comision = ventas * 0.15
pension = sueldo * 0.12
salud = sueldo * 0.14
salario = (sueldo + comision) - (pension + salud)
TextBox4.Text = nombre + "," + vbCrLf + "Usted ganó " + CStr(salario) + vbCrLf + "Descuentos:" + vbCrLf + "Pensión: " + CStr(pension) + vbCrLf + "Salud: " + CStr(salud)
End Sub
End Class
No hay comentarios:
Publicar un comentario