VB.
NET PRACTICAL FILE
Name: ____________
Class: ____________
Subject: [Link]
Program 1: Maximum between three numbers
Aim:
To write a [Link] program for Maximum between three numbers.
Code:
Dim a As Integer = 10
Dim b As Integer = 20
Dim c As Integer = 15
If a > b And a > c Then
[Link](a)
ElseIf b > c Then
[Link](b)
Else
[Link](c)
End If
Output:
Output will be displayed in MessageBox.
Program 2: Positive, Negative or Zero
Aim:
To write a [Link] program for Positive, Negative or Zero.
Code:
Dim n As Integer = -5
If n > 0 Then
[Link]("Positive")
ElseIf n < 0 Then
[Link]("Negative")
Else
[Link]("Zero")
End If
Output:
Output will be displayed in MessageBox.
Program 3: Leap Year Check
Aim:
To write a [Link] program for Leap Year Check.
Code:
Dim y As Integer = 2024
If y Mod 4 = 0 Then
[Link]("Leap Year")
Else
[Link]("Not Leap Year")
End If
Output:
Output will be displayed in MessageBox.
Program 4: Alphabet Check
Aim:
To write a [Link] program for Alphabet Check.
Code:
Dim ch As Char = "A"
If [Link](ch) Then
[Link]("Alphabet")
Else
[Link]("Not Alphabet")
End If
Output:
Output will be displayed in MessageBox.
Program 5: Quadratic Equation Roots
Aim:
To write a [Link] program for Quadratic Equation Roots.
Code:
Dim a As Double = 1, b As Double = -5, c As Double = 6
Dim d As Double = b*b - 4*a*c
If d >= 0 Then
[Link]("Roots are real")
Else
[Link]("Roots are imaginary")
End If
Output:
Output will be displayed in MessageBox.