viernes, 30 de mayo de 2014

Progranas de la calculadora y del promedio en VIsual Basic



Manejo de técnicas de Programación
Programas de la calculadora y del promedio en visual estudio   






Cuatro calificaciones en visual estudio
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim calif1, calif2, calif3, calif4 As Integer
        calif1 = TextBox1.Text
        calif2 = TextBox2.Text
        calif3 = TextBox3.Text
        calif4 = TextBox4.Text
        TextBox5.Text = (calif1 + calif2 + calif3 + calif4) / 4
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        TextBox5.Text = ""
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim resp As String
        resp = MsgBox("Desea Salir Del Programa?", vbYesNo, "salir")
        If resp = vbYes Then
            End
        End If
    End Sub
End Class













No hay comentarios.:

Publicar un comentario