Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help converting this file from a \"Do While Loop to a \"For LOOP\' My fin

ID: 3760683 • Letter: I

Question

I need help converting this file from a "Do While Loop to a "For LOOP' My final answers are coming up blank here is the file I started with

' NewMultiply.vb - This program prints the numbers 0 through 10 along
' with these values multiplied by 10 and by 100.
' Input: None
' Output: Prints the numbers 0 through 10 along with these values multiplied by 10 and by 100.
Option Explicit On
Option Strict On
Module NewMultiply
   Sub Main()
        ' Declarations
   Const head1 As String = "Number: "
        Const head2 As String = "Multiplied by 10: "
        Const head3 As String = "Multiplied by 100: "
        Dim numberCounter As Integer ' Numbers 0 through 10
        Dim byTen As Integer        ' Stores the number multiplied by 10
        Dim byHundred As Integer    ' Stores the number multiplied by 100
        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 10 and by 100")
   ' This is the work done in the detailLoop() procedure  
      
   ' Write your For loop here


    End Sub ' End of Main() procedure
End Module ' End of NewMultiply module

Explanation / Answer

Option Explicit On
Option Strict On
Module NewMultiply
   Sub Main()
        ' Declarations
    Const head1 As String = "Number: "
        Const head2 As String = "Multiplied by 10: "
        Const head3 As String = "Multiplied by 100: "
        Dim numberCounter As Integer ' Numbers 0 through 10
        Dim byTen As Integer        ' Stores the number multiplied by 10
        Dim byHundred As Integer    ' Stores the number multiplied by 100
        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 10 and by 100")
    ' This is the work done in the detailLoop() procedure  
      
    ' Write your For loop her
    For numberCounter = 0 To NUM_LOOPS
         
              System.Console.WriteLine("{0} {1} {2} {3} {4} {5}",head1,numberCounter,head2,(numberCounter * 10),head3,(numberCounter * 100))
   
    Next
    End Sub ' End of Main() procedure
End Module ' End of NewMultiply module

0 through 10 multiplied by 10 and by 100                                                                                               

Number:  0 Multiplied by 10:  0 Multiplied by 100:   0                                                                                 

Number:  1 Multiplied by 10:  10 Multiplied by 100:   100                                                                              

Number:  2 Multiplied by 10:  20 Multiplied by 100:   200                                                                              

Number:  3 Multiplied by 10:  30 Multiplied by 100:   300                                                                              

Number:  4 Multiplied by 10:  40 Multiplied by 100:   400                                                                              

Number:  5 Multiplied by 10:  50 Multiplied by 100:   500                                                                              

Number:  6 Multiplied by 10:  60 Multiplied by 100:   600                                                                              

Number:  7 Multiplied by 10:  70 Multiplied by 100:   700                                                                              

Number:  8 Multiplied by 10:  80 Multiplied by 100:   800                                                                              

Number:  9 Multiplied by 10:  90 Multiplied by 100:   900                                                                              

Number:  10 Multiplied by 10:  100 Multiplied by 100:   1000   

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote