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


Please Help Members By Posting Answers For Below Questions

What is the difference between readonly variable and constant variable?

788


Explain option strict?

757


What is public assembly?

779


Explain clr?

781


Explain how does the xmlserializer work?

813


What do you mean by serialization and deserialization?

739


Explain about visual basic?

773


Explain convert.tostring and i.tostring method?

722


I Am Developing A project where I can send Message from One Computer to Another Computer With The Help Of LAN.Already I Have developed..It is working Fine With The Details Of ..TO,FROM,REF No,DATE,BODY...Now I Want To Add Attachments part in the same projects...How Can I Send Attachment File & How To Send It..I Am Working in VB.Net 2005 With out Any database. Can Any One Help me ??How To Write Code??Plz Send me a copy to my Mail also...I Dont Need Any Software Available in The Internet...Plz refer me The Code in VB.Net maloy.adhikari@in.com

2430


Explain how the .net framework performs automatic memory management.

795


Is vb.net dead?

746


Did vb6 support multi-threading ?

758


So you know which dll is used for microsoft .net run time?

757


What is visual basic.net culture?

765


Explain an assembly and its use?

725