How To Use Select Case In Console Application?

By Goniey N (Mr. G)

Use Of Select Case In Console Application...

Sub Main()
        
Dim s1, s2, s3, tot As Integer
        
Dim per As Double
      
Console.WriteLine("Enter the mark of First Subject out of 100")
        s1 =
Console.ReadLine()
      
Console.WriteLine("Enter the mark of Second Subject out of 100")
        s2 =
Console.ReadLine()
      
Console.WriteLine("Enter the mark of Third Subject out of 100")
        s3 =
Console.ReadLine()
        tot = s1 + s2 + s3
        per = (tot / 300) * 100
      
Console.WriteLine("Your Total is:=>" & tot)
      
Console.WriteLine("your Percentage is:=>" & per)

        
Select Case (per)
            
Case Is < 40
              
Console.WriteLine("Grade:=>Fail")
              
Console.ReadLine()
            
Case 40 To 50
              
Console.WriteLine("Grade:=>Second Class")
              
Console.ReadLine()
            
Case 50 To 60
              
Console.WriteLine("Grade:=>First Class")
              
Console.ReadLine()
            
Case Is > 70
              
Console.WriteLine("Grade:=>Distionction")
              
Console.ReadLine()
        
End Select
End Sub

How To Use Select Case In Console Application?  (894 Views)