PROGRAM MENGHITUNG DISCON


Nama : SRIWAHYUNI
NIM : 19010020

Public Class Form1

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        End
    End Sub

    Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
        If Val(TextBox3.Text) >= 100 Then
            TextBox4.Text = 0.3
        ElseIf Val(TextBox3.Text) >= 50 Then
            TextBox4.Text = 0.2
        ElseIf Val(TextBox3.Text) >= 25 Then
            TextBox4.Text = 0.1
        Else
            TextBox4.Text = 0
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox5.Text = (TextBox2.Text * TextBox3.Text) - (TextBox2.Text * TextBox3.Text * TextBox4.Text)
    End Sub
End Class

Komentar