Header Ads

Header Ads

Visual Basic - Program Menghitung Nilai Hasil Ujian


Program menghitung Nilai Hasil Ujian

  1.   Input            : Tugas, UTS, UAS dan Jumlah Kehadiran
  2.  Output         : Rata-rata dan Hasil
  3.  Rata-rata     = (Tugas + UTS + UAS) / 3
  4. Hasil            =  Jika rata-rata <=60 atau jumlaah kehadiran < 12, maka Hasil = “Tidak Lulus” selain itu,  Hasil = “Lulus”



Private Sub BBatal_Click()
TxtTugas = ""
TxtUTS = ""
TxtUAS = ""
TxtJumlah = ""
TxtRataRata = ""
TxtHasil = ""
End Sub

Private Sub BHitung_Click()
TxtRataRata.Text = Val((Val(TxtTugas.Text) + Val(TxtUAS.Text) + Val(TxtUTS.Text)) / 3)

If TxtJumlah.Text <= 12 Then
TxtHasil = "Tidak Lulus"
ElseIf TxtRataRata.Text <= 60 Then
TxtHasil = "Tidak Lulus"
Else
TxtHasil = "Lulus"
End If

End Sub

Private Sub BKeluar_Click()
Unload Me
End Sub





Powered by Blogger.