It should be in Visual Studio 2010 Your program will do the following: You are t
ID: 670161 • Letter: I
Question
It should be in Visual Studio 2010
Your program will do the following:
You are to produce a Multiplication Table in your console window. Your program should prompt the user to input a number (integer type) as the size of that table.
Sample Output: With a size of 5 the Multiplication Table will look like this:
1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25
Explanation / Answer
ANSWER:
Imports System
Public Module Module1
Public Sub Main()
Dim size As Integer
Console.Write("Size of table ?")
size = Console.ReadLine
For j = 1 To 5 //rows
For i = 1 To size //col
Console.Write(i * j)
Console.Write(" ")
Next
Console.WriteLine()
Next
Console.ReadLine()
End Sub
End Module
OUTPUT:
Size of table ? 5
1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.