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
Which properties are used to bind a DataGridView control?
Write program in VB.Net with SQL Server and Crystal Reports to develop a small windows application to add,edit,save, search and print Employee Information and send sourcecode as zip file. empcode : .............. empname : .............. dateofjoin : dd/mm/yyyy dateofbirth : dd/mm/yyyy TableName: EmpMaster EmpCode EmpName DOB DOJ TableName: EmpDocs EmpCode DocNo DocName ExpDate
What are the different types of applications supported in .net (or) .net framework?
Tell us how many languages are supported by .net?
Is it necessary to have SQL server installed in your computer in order to create a service based database in vb.net?
What is the difference between vb 6 and vb.net?
What are the difference between structure and class?
Define cls?
Which is the base class for all the classes in .net framework?
Explain convert.tostring and i.tostring method?
What is trace in vb.net?
What are the shadow variables?
how to deploy vb.net with key and evaluation time? any one can help me?
What are the differences between server-side and client-side code?
Using VB, how can you change the Mouse Pointer?