Public Class Form1
Dim nott1, nott2 As Integer
Dim no As Integer
Dim ad, soyad As String
Dim sonuc As Double
Dim durum As String
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click
nott1 = TextBox4.Text
nott2 = TextBox5.Text
no = TextBox1.Text
ad = TextBox2.Text
soyad = TextBox3.Text
If (nott1 < 101 And nott1 >= 0) And (nott2 < 101 Andnott2 >= 0) Then
sonuc = (nott1 * 40 / 100) + (nott2 * 60 / 100)
If sonuc > 44 Then
durum = "Geçti"
Else
durum = "Kaldı"
End If
ListBox1.Items.Add(no & " Nolu " & ad & " " & soyad & " " & sonuc & " alarak " & durum)
Else
MsgBox("Lütfen 0 ile 100 arasında bir not değeri giriniz.")
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button3.Click
ListBox1.Items.Clear()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button2.Click
ListBox1.Items.Remove(ListBox1.SelectedItem)
End Sub
End Class
Hiç yorum yok:
Yorum Gönder