I need help with Visual Basic

Discussion in 'Programming' started by Gelizzy88, Apr 27, 2011.

  1. #1
    I seriously need help with these visual basic problems ASAP! If anyone knows how to do this, please help me out. Thank you

    What is the output of the code?

    Dim intAdd As Integer
    Dim intOuterLoop As Integer
    Dim intInnerLoop As Integer

    intAdd = 0
    For intOuterLoop = 1 to 8
    For intInnerLoop = 3 to 7
    intAdd += 1
    Next
    Next
    MessageBox.Show("The final value is " & intAdd.ToString())

    How many times will the loop be executed?

    Dim intQuantitySold as Integer
    Dim decTax as Decimal

    intQuantitySold = 1
    Do Until intQuantitySold = 5
    decTax = intQuantitySold * 0.07
    Me.1stDisplay. Items. Add ("Tax Amount: " & decTax.ToString ())
    intQuantitySold += 1
    Loop

    PLEASE PLEASE Help me out you guys. Thanks in advance
     
    Last edited: Apr 27, 2011
    Gelizzy88, Apr 27, 2011 IP
  2. om39a

    om39a Peon

    Messages:
    287
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    These valus will be displayed in message box

    1 2 3 4 5
    6 7 8 9 10
    11 12 13 14 15
    16 17 18 19 20
    21 22 23 24 25
    26 27 28 29 30
    31 32 33 34 35
    36 37 38 39 40


    Outer Loop will run for 4 times
     
    om39a, May 2, 2011 IP