tutorialswb

TutorialsWB hadir sebagai wadah bagi teman-teman yang ingin "Belajar PHP Dasar". Sehingga kami yakin bahwa TutorialsWB akan menjadi Pusat "Belajar Bahasa Pemrograman PHP" Disamping PHP website ini menyediakan berbagai tips dan trik Blogger. Kami menerima Pemasangan iklan banner atau artikel.

Hubungi Saya

Visual Basic 2010 Menghitung Nilai Mahasiswa Lengkap




Menghitung Nilai Mahasiswa Lengkap VB 2010
 Public Class Form1
    Private Sub btnHitung_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHitung.Click
        Dim Nim As String
        Dim Nama As String
        Dim Tugas As Double
        Dim UTS As Double
        Dim UAS As Double
        Dim Huruf As String
        Dim Angka As Double
        Dim Komentar As String
        NIM = TextNim.Text
        Nama = TextNama.Text
        Tugas = Val(TextTugas.Text)
        UTS = Val(TextUTS.Text)
        UAS = Val(textUAS.Text)
        Angka = (0.2 * Tugas + 0.3 * UTS + 0.5 * UAS)
        textAngka.Text = Angka
     
        If Angka <= 56 Then
            Huruf = "E"
            Komentar = "Nilai Anda Sangat kurang"
        ElseIf Angka <= 65 Then
            Huruf = "D"
            Komentar = "Nilai Anda Kurang"
        ElseIf Angka <= 75 Then
            Huruf = "C"
            Komentar = "Nilai Anda Cukup! Anda Lulus"
        ElseIf Angka <= 85 Then
            Huruf = "B"
            Komentar = "Nilai Anda Baik! Anda Lulus"
        ElseIf Angka > 85 Then
            Huruf = "A"
            Komentar = "Nilai Anda Sangat Baik"
        End If
        textHuruf.Text = Huruf
        textKomentar.Text = Komentar
    End Sub
    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
        TextNim.Text = ""
        TextNama.Text = ""
        TextTugas.Text = ""
        TextUTS.Text = ""
        textUAS.Text = ""
        textAngka.Text = ""
        textHuruf.Text = ""
        textKomentar.Text = ""
    End Sub
    Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
        End
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.BackColor = Color.AliceBlue
    End Sub
End Class



Baca Juga

closed