Senin, 08 April 2013

Program Nilai Select Case


Kode program:
Private Sub cmdKlik_Click()
Dim Nilaiharian, uts, uas As Integer
Dim keterangan As String
Dim hasil As Double
tugas = Val(txtNH.Text)
uts = Val(txtuts.Text)
uas = Val(txtuas.Text)
hasil = (tugas + (2 * uts) + (3 * uas)) / 6

Select Case hasil
Case Is > 100 Or hasil < 0
lblket.Caption = "Di Luar Jangkauan"
Case Is >= 85
lblket.Caption = "A"
Case Is >= 75 And hasil <= 84
lblket.Caption = "B"
Case Is >= 60 And hasil <= 74
 lblket.Caption = "C"
Case Is > 50 And hasil <= 59
lblket.Caption = "D"
Case Is <= 50
lblket.Caption = "E"
End Select
lblHasil.Caption = Format(hasil, "#####.##")
End Sub


program buat VB nih, silahkan mencoba ^_^

4 komentar:

  1. wes ... mantep nih kak Rully :D

    cuma kalo bisa, saya request koding C++ nya dong :P hahaha

    BalasHapus
    Balasan
    1. wah maaf, saya tidak mempelajari c++. hehe :D

      Hapus
  2. The best titanium glasses - Technological Arts
    The best titanium glasses. By the time we reach nano titanium by babyliss pro the finish of the next generation of VR babyliss pro nano titanium flat iron headsets the gaming industry titanium magnetic is already titanium app well titanium 3d printing underway,

    BalasHapus