Dim copy, cut As Integer cut = 6 copy = 30 Do While copy >= cut copy -= 7 ListBox1.Items.Add(copy) Loop
1-What will be the first item from the listbox?
Answers
Answered by
0
Answer:
23
Explanation:
So the program basically declares two integer variables, 'cut' and 'copy'. Integers cannot store decimal numbers, for example 3.0 or 4.7 are invalid. Valid integers are considered to be numbers like 4 or 1 (example)
Then the variables are initialized with values 6 and 30 respectively. Then a Do While loop keeps executing the statements inside it while the variable copy is greater than or equal to the variable cut.
Then, in the first statement, 7 is subtracted from the variable copy (30-7=23), hence the first item in the list box will be 23
Similar questions