Double click command1 and enter the steps as given after finishing the commands shown below : Declare 3 integers n1,n2,n3 DIM N1,N2,N3 AS INTEGER Declare 2 real numbers named sum and average DIM SUM,AVERAGE AS SINGLE the numeric value from text boxes text1,text2 and text3 to variables n1,n2 and n3 respectively N1=VAL(TEXT1.TEXT) N2=VAL(TEXT2.TEXT) N3=VAL(TEXT3.TEXT) Store the sum of n1, n2 and n3 in variable total TOTAL=N1+N2+N3 The variable average is found by dividing total by 3. Display the string sum of all numbers is followed by the value of TOTAL and the string “The “ average the numbers is followed by the variable containing the average as the caption “The “ of Label1 LABEL1.CAPTION=”THE SUM OF ALL NUMBERS IS + OF THE “+STR$(TOTAL) “AVERGE NUMBERS IS “+STR$(AVERAGE) Fill in the blanks to complete the commands given below : The product of the values entered in text boxes Text1 and Text2 is placed in Text3 = Val(Text1.text)*Val(Text2.text) Text3.text The text in Text3 is assigned to the caption of Label3 Label3.caption =Text3.text Create a new form . Double the form and add the code in the questions below. Write the output of the program in the box provided : Private Sub Form_Load() Form1.Show Dim A, B, C, D, E, F As String SLOW AND STEADY WINS THE RACE A = "SLOW " RAJU WON THE RACE B = "AND " TOM LOST THE RACE BECAUSE HE WAS SLOW C = "STEADY " D = "WINS " E = "THE " F = "RACE" Print A + B + C + D + E + F Print "RAJU WON " + E + F Print "TOM LOST "& E & & F & " BECAUSE HE WAS " & A “ “
Double click command1 and enter the steps as given after finishing the commands shown below : Declare 3 integers n1,n2,n3 DIM N1,N2,N3 AS INTEGER Declare 2 real numbers named sum and average DIM SUM,AVERAGE AS SINGLE the numeric value from text boxes text1,text2 and text3 to variables n1,n2 and n3 respectively N1=VAL(TEXT1.TEXT) N2=VAL(TEXT2.TEXT) N3=VAL(TEXT3.TEXT) Store the sum of n1, n2 and n3 in variable total TOTAL=N1+N2+N3 The variable average is found by dividing total by 3. Display the string “The sum of all numbers is “ followed by the value of TOTAL and the string “The average the numbers is “ followed by the variable containing the average as the caption of Label1 LABEL1.CAPTION=”THE SUM OF ALL NUMBERS IS “+STR$(TOTAL) + “AVERGE OF THE NUMBERS IS “+STR$(AVERAGE) Fill in the blanks to complete the commands given below : The product of the values entered in text boxes Text1 and Text2 is placed in Text3 Text3.text = Val(Text1.text)*Val(Text2.text) The text in Text3 is assigned to the caption of Label3 Label3.caption =Text3.text Create a new form . Double the form and add the code in the questions below. Write the output of the program in the box provided : Private Sub Form_Load() Form1.Show SLOW AND STEADY WINS THE RACE RAJU WON THE RACE TOM LOST THE RACE BECAUSE HE WAS SLOW Dim A, B, C, D, E, F As String A = "SLOW " B = "AND " C = "STEADY " D = "WINS " E = "THE " F = "RACE" Print A + B + C + D + E + F Print "RAJU WON " + E + F Print "TOM LOST "& E & “ “ & F & " BECAUSE HE WAS " & A
class-9-vb-term2-assignment.docx