0% found this document useful (0 votes)
37 views2 pages

Array in

The document declares a marks array with 20 integer elements to store student exam scores. It then initializes the array with specific scores. It uses a For loop to iterate through the array, checking each score against criteria to determine if the student is shortlisted for interview, shortlisted for interview II, or not shortlisted, displaying the result in a message box.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views2 pages

Array in

The document declares a marks array with 20 integer elements to store student exam scores. It then initializes the array with specific scores. It uses a For loop to iterate through the array, checking each score against criteria to determine if the student is shortlisted for interview, shortlisted for interview II, or not shortlisted, displaying the result in a message box.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Public Class Form1

Private Sub Show_Click(sender As Object, e As EventArgs) Handles show.Click


Dim marks(19) As Integer
Dim i As Integer
marks(0) = 94
marks(1) = 89
marks(2) = 90
marks(3) = 81
marks(4) = 45
marks(5) = 56
marks(6) = 66
marks(7) = 72
marks(8) = 38
marks(9) = 43
marks(10) = 78
marks(11) = 50
marks(12) = 69
marks(13) = 86
marks(14) = 77
marks(15) = 57
marks(16) = 63
marks(17) = 58
marks(18) = 79
marks(19) = 93
For i = 0 To 19
If marks(i) >= 85 Then
MsgBox("shortlisted for interview " & marks(i))

End If

Next
For i = 0 To 19
If marks(i) >= 65 And marks(i) < 85 Then

MsgBox("shortlisted for interview II " & marks(i))

End If

Next
For i = 0 To 19
If marks(i) < 65 Then

MsgBox(" not shortlisted " & marks(i))

End If

Next
End Sub
End Class

You might also like