Write a program that accepts an array of numbers and a
number, and return a string “Yes” if
the number is found in the array, “No” if the number is not
found in the array.
Answer Posted / lince
Dim num() As Integer = {5, 3, 6, 7, 1}
Public Function Find(ByVal sNum As Integer) As String
Dim i As Integer = 0
For i = 0 To num.Count - 1
If (sNum = num(i)) Then
Return "Yes"
End If
Next
Return "No"
End Function
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is global assembly cache (gac)?
Described strong typing
Explain an assembly and its use?
What is sealed class?
What is the difference between datagrid and gridview?
Explain about Visual basic.NET culture?
What are different types of jit ?
Explain the use of console application?
What is jagged array in vb.net?
What is writeline in vb.net?
Define clr?
What are the advantages of migrating to vb.net?
What is an arraylist?
How do you define a read only property in a class module?
What is the significance of delegates. Where should they be used?