Gad Experiments
Gad Experiments
Gad Experiments
5
Imports System
Module Program
Sub Main(args As String())
Dim grade As Char
Console.WriteLine("Enter your Grades !!!")
grade = Console.ReadLine()
End Sub
End Module
Imports System
Module Program
Sub Main(args As String())
Dim n As Char
Console.WriteLine("Enter a Letter !!!")
n = Console.ReadLine()
Select Case n
Case "A", "a"
Console.WriteLine("The entered letter is a vowel")
Case "E", "e"
Console.WriteLine("The entered letter is a vowel")
Case "I", "i"
Console.WriteLine("The entered letter is a vowel")
Case "O", "o"
Console.WriteLine("The entered letteris a vowel")
Case "U", "u"
Console.WriteLine("The entered letter is a vowel")
Case Else
Console.WriteLine("The entered letter is a not vowel or it is not a character")
End Select
End Sub
End Module
Imports System
Module Program
Sub Main(args As String())
Dim a, b, r As Double
Dim operation As Char
Console.WriteLine("Enter two numbers !!!")
a = Console.ReadLine()
b = Console.ReadLine()
Console.WriteLine("Enter operation to be performed !!!")
operation = Console.ReadLine()
Select Case operation
Case "ADD", "add"
r=a+b
Console.WriteLine("Addition is " & r)
Case "SUB", "sub"
r=a-b
Console.WriteLine("Subtraction is " & r)
Case "MUL", "mul"
r=a*b
Console.WriteLine("Multiplication is " & r)
Case "DIV", "div"
r=a/b
Console.WriteLine("Division is " & r)
Case Else
Console.WriteLine("Enter the operation correctly !!!")
End Select
End Sub
End Module
Experiment.6
Module Module1
Sub Main()
Dim count As Integer = 1
While count <= 5
Console.WriteLine("While loop iteration : " & count)
count += 1
End While
Dim anotherCount As Integer = 1
Do
Console.WriteLine("Do loop iteration : " & anotherCount)
anotherCount += 1
Loop While anotherCount <= 5
Console.ReadLine()
End Sub
End Module
Experiment.8
End Sub
End Class
Imports System.DirectoryServices
End Sub