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
Explain what observations between vb.net and vc#.net?
Can you please explain the difference between system.string and system.stringbuilder classes?
Explain code security?
What is a stream in vb.net?
What is the difference between compiler and interpreter?
How to run a dos command in vb.net?
What keyword is used to accept a variable number of parameter in a method?
What is the main purpose of garbage collector?
What is enumerator?
What is the maximum size of the textbox?
Can you please explain the difference between dispose and finalize()?
Explain enumerator?
What is the main use of a namespace?
What is difference between metadata and manifest?
Explain the difference between int and int32?