Senin, 08 April 2013

Program Nilai Akhir


nih buat yang nyari coding buat VB 
Kode program
Private Sub cmdKlik_Click()
Dim Nilaiharian, uts, uas As Integer
Dim keterangan As String
Dim hasil As Double
Nilaiharian = Val(txtNH.Text)
uts = Val(txtuts.Text)
uas = Val(txtuas.Text)
hasil = (Nilaiharian + (2 * uts) + (3 * uas)) / 6
If hasil > 100 Or hasil < 0 Then
    lblket.Caption = "Diluar jangkauan"
ElseIf hasil >= 85 Then lblket.Caption = "A"
ElseIf hasil >= 75 And hasil <= 84 Then lblket.Caption = "B"
ElseIf hasil >= 60 And hasil <= 74 Then lblket.Caption = "C"
ElseIf hasil > 50 And hasil <= 59 Then lblket.Caption = "D"
ElseIf hasil >= 0 And hasil <= 50 Then lblket.Caption = "E"  
End If
lblHasil.Caption = hasil
End Sub

selamat mencoba!! ^_^

Tidak ada komentar:

Posting Komentar