I need the codes for this visual basic program. Download this forme with five bu
ID: 3599386 • Letter: I
Question
I need the codes for this visual basic program. Download this forme with five buttons (one for each type of loop, a Clear button that clears the list box and a Quit button to stop the program) and a large list box. Make Three Click events - one for each type of Loop. Each click event will contain two loops as described below.. (NOTE: The numbers do not have to be on one line. They can be vertical.) A. While Loops: Make two While Loops that output the following values Loop 1: Write a While Loop that prints the following sequence of numbers to the screen: 1 2 3 4 5 Loop 2: Write a second While Loop that prints the following sequence of numbers to the screen: 3 8 13 18 23 B. Do - Until Loops: Make two Do-Until Loops that output the following values. Loop 1: Write a Do-Until Loop that prints the following sequence of numbers to the screen: 20 14 8 2 4 10 Loop 2: write a second Do-Un numbers to the screen: Loop that prints the following sequence of 19 27 35 43 51 C. For - Next Loop: Make two For-Next Loops that output the following values Loop 1: Write a For - Next Loop that prints the following sequence of numbers to the screen: 1 4 9 16 25 36 Loop 2: Write a second For- Next Loop that prints the following sequence of numbers to the screen 5.0 4.25 3.50 2.75 2.00 1.25 o.50Explanation / Answer
A.
Loop1:
dim i as integer
i = 1
while(i <= 5)
Console.Write(i & " ")
i += 1
End while
Loop2:
dim i as integer
i = 3
while(i <= 25)
Console.Write(i & " ")
i += 5
End while
B.
Loop1:
dim i as integer
i = 20
Do while(i >= -10)
Console.Write(i & " ")
i -= 6
Loop
Loop2:
dim i, count as integer
i = 19
count = 0
Do while(count < 5)
count += 1
Console.Write(i & " ")
i += 8
Loop
C.
Loop1:
for i as integer = 1 to 6
Console.Write(i*i & " ")
next
Loop2:
for i as double = 5.0 to 0 step -0.75
Console.Write(i & " ")
next