Results 1 to 3 of 3

Thread: Working with Given Codes in VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2010
    Location
    North Carolina
    Posts
    14

    Red face Working with Given Codes in VB

    Okay. My question is how do I set up a code to run it in order to get the answers? Example:
    Code:
    Dim a As Decimal = 2.5D
              Dim b As Decimal = 4.0D
              Dim c As Decimal = 12.7D
              
              Dim i As Integer = 4
              Dim j As Integer = 8
              Dim k As Integer = 17
    I want to find the value of X after this statement is executed?
    Code:
    Dim X As Integer = i + j
    I am not asking for the results. The result is what I would like to figure out for myself. However, I am very new to VB and would like to know how to set this form. I am aware of variables being declared. What suggestions do you have for testing this and other codes like this?

    Thank you.

  2. #2
    New Member
    Join Date
    Feb 2010
    Posts
    13

    Re: Working with Given Codes in VB

    Is what you are asking having the ability to display the result? If so, there are many many many ways of doing so.

    You can create a Label and simply put in:
    Code:
    label1.text = X
    Or you can use a Message Box:
    Code:
    msgbox(X)
    Those are just a couple of ways of doing it.

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2010
    Location
    North Carolina
    Posts
    14

    Smile Re: Working with Given Codes in VB

    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width