1. Engineering
  2. Computer Science
  3. visual basic i when button lp1 is clicked display in...

Question: visual basic i when button lp1 is clicked display in...

Question details

Visual Basic  


(i) When button LP1 is clicked display in a label the following output:
1 2 3 4 5 6 7 8 9 10
Use Do While loop. Display the result in Label. see the comments in the code for an explanation of the various parts.

(ii) When button LP2 is clicked display in a label the following output:
10 20 30 40 50 60 70 80 90 100
Use For loop. Display the result in Label.

(iii) When button LP3 is clicked display in a label the following output:
1 -2 3 -4 5 -6 7 -8 9 -10
Use For loop. Display the result in Label.

(iv) When button LP4 is clicked display in a label the following output:
-1 2 -3 4 -5 6 -7 8 -9 10
Use For loop. Display the result in Label. Copy and paste the code from LP3 button in LP4 button code handler. MODIFY ONLY ONE CHARACTER in the code given for LP3 to get the results for LP4.

(v) Have a button, "Knock Out", which when clicked will print:
1 2 3 4 5 6 7 8 9 10 KnockOut.
Must use a while loop. Display the result in Label. Write code to accomplish this.

(vi) Have a button, "Launch", which when clicked will print:
10 9 8 7 6 5 4 3 2 1 Blastoff.
Must use a For loop. Display the result in Label. Write code to accomplish this.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution