CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Basic

  1. #1
    Join Date
    Jan 2000
    Posts
    19

    Basic

    I need help in code for basic math like
    add
    subtract
    multiply
    division

    Thanks in Advance
    Donny S.


  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Basic

    >I need help in code for basic math like
    >add
    >subtract
    >multiply
    >division

    How about:


    Dim a as Integer
    Dim b as Integer
    '
    a = 5
    b = 6
    '
    MsgBox "a+b = " & (a+b)
    MsgBox "b-a = " & (b-a)
    MsgBox "a*b = " & (a*b)
    MsgBox "a/b = " & (a/b)





    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

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

Featured