Search for Knowledge
“A mistake is a signal that it is time to learn something new, something you didn’t know before.”

Coding Console Application If Then

Console Application If Then

Console Application If then, yang terbuat dari Microsoft Visual Studio pada Console Application. Yang tertulis dengan coding :

Import System
Module Module1
    Sub Main()
        Dim Nilai As Single
        Console.Write (“Masukkan Nilai Akhir :”)
        Nilai = Console.ReadLine()
        If Nilai >= 85 Then
            Console.WriteLine(“A”)
        ElseIf Nilai >= 70 Then
            Console.WriteLine (“B”)
        ElseIf Nilai >= 60 Then
            Console.WriteLine (“C”)
        ElseIF Nilai >= 25 Then
            Console.WriteLine(“D”)
        Else
            Console.WriteLine(“E”)
        End If
        Console.ReadLine()
    End Sub
End Module

Hasil Output ketika dirun :