Question: In this lab, you work with the same visual basic program you worked with in lab 5-1. As in lab 5-1, the completed program should

In this lab, you work with the same visual basic program you worked with in lab 5-1. As in lab 5-1, the completed program should print the numbers 0 through 10, along with their values multiplied by 2 and 10. however, in lab you should accomplish this using a For loop instead of a counter-controlled Do While Loop.

Multiply.vb - This program prints the numbers 0 through 10 along

' with these values multiplied by 2 and by 10.

' Input: None

' Output: Prints the numbers 0 through 10 along with these values multiplied by 2 and by 10.

Option Explicit On

Option Strict On

Module Multiply

Sub Main()

' Declarations

Const head1 As String = "Number:"

Const head2 As String = "Multiplied by 2: "

Const head3 As String = "Multiplied by 10: "

Dim numberCounter As Integer ' Numbers 0 through 10

Dim byTen As Integer ' Stores the number multiplied by 10

Dim byTwo As Integer ' Stores the number multiplied by 2

Const NUM_LOOPS As Integer = 10 ' Constant used to control loop

' This is the work done in the housekeeping() procedure

System.Console.WriteLine("0 through 10 multiplied by 2 and by 10")

' This is the work done in the detailLoop() procedure

' Write the For loop here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!