Hello all, I need some help in a question i've been trying to solve:
I'm using an array and input boxes, this is where i am in codeFor this problem, the user enters a number n (1<n<21) to indicate how many numbers he/she has, then he/she enters the n numbers. The program must then ask for an additional number. The output of the program will indicate whether the last number is contained in the n numbers. Your output should resemble what is provided in the example below. All of the numbers that will be entered are integers.
The output is always the same to no matter what input it gotCode:Dim m As Integer Dim search(1 To 21) As Integer Dim y As Integer Private Sub addnumbers() For m = 1 To Text1.Text search(m) = InputBox("enter your numbers", "Number Entry") Next y = InputBox("Enter a final Number", "Number Entry") End Sub Private Sub Command1_Click() addnumbers End Sub
This is an example of how the output should be
Input:
5
1
2
15
10
5
10
Output:
The number 10 appears in the 5 numbers.




Reply With Quote
