Write a Visual Basic program which: Prints out the Multiplication Table for a ra
ID: 3841248 • Letter: W
Question
Write a Visual Basic program which: Prints out the Multiplication Table for a range of numbers (positive integers). Using an input box, prompts the user for a starting number: say 'x' Using an input box, prompts the user for an ending number: say 'y' Using label, prints out the multiplication table from 'x' up to the number 'y' Sample outputs include: chapter8QuizSampleOutput.png SPECIFIC REQUIREMENTS FOR THIS ACTIVITY Make the ClickMe button the “Accept” button. (If applicable) Make the text box which captures user input get focus when your application starts. You must use the following Sub to load the array: Sub loadArray(ByRef table(,) As Integer, ByVal intFrom As Integer, ByVal intTo As Integer) You must use the following Sub to display the array: printMultiplicationTable(ByVal table(,) As Integer, ByVal intFrom As Integer, ByVal intTo As Integer) You must load a two-dimensional array called table array with the products of the factors. For example: In Figure 2 above, the 5 x 5 array is loaded with the products for the times tables from 5 to 8 In Figure 2 above, the 2 x 2 array is loaded with the products for the times tables from 5 to 6 GENERAL RESTRICTIONS FOR ALL QUIZZES, MIDTERM AND FINAL EXAM Option Explicit On Option Strict On
Explanation / Answer
Private Sub xCalculateButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) HandlesxCalculateButton.Click 'calculate x and a number to get y Dim x As Integer Dim counter As Integer 'try parsing the value entered as an integer, placed in "x" Dim isconverted As Boolean isconverted = Integer.TryParse(Me.xInput.Text, x) If isconverted Then 'clear the label xLabel.Text = "" 'Loop from 1 to 9 and multiply the input "x" and the conter 'to get our result Do While counterRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.