Results 1 to 12 of 12

Thread: vb variables

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2001
    Posts
    2

    Wink vb variables

    Visual Basics, write the statement to add 1,2 and 3 together and multiplythe intermediate result by 4, then raise that intermediate result to the power of 2 store the result in a variable named mintresult

  2. #2
    nullus
    Guest
    like this?

    VB Code:
    1. minresult = ((1 + 2 + 3) * 4) ^ 2

    sorry, my maths is off, so i dunno if i've understood 'intermediate result'

  3. #3
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390
    me neither nullus...

    but I think you got it
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    Private Sub Form_Load()
    Dim a As Integer
    dim b as integer
    dim c as integer
    dim d as integer
    dim e as integer
    dim mintresult as integer

    a = 1
    b = 2
    c = 3
    d = a+b+c
    e = d * 4
    mintresult = e * e

    'to check the answer put take the comment out of the next
    'line
    'debug.print minresult
    'it will print the answer to the debug section

    End Sub
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  5. #5
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    like this?



    visual basic code:--------------------------------------------------------------------------------minresult = ((1 + 2 + 3) * 4) ^ 2
    --------------------------------------------------------------------------------


    sorry, my maths is off, so i dunno if i've understood 'intermediate result'
    So much shorter than mine... DAMN!!!! i think mine might be more easily readable though.
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  6. #6
    nullus
    Guest
    wow, i got a maths question right?? good lord!

  7. #7
    Lively Member
    Join Date
    Jun 2001
    Location
    CT
    Posts
    124
    hehe, I just passes calc in school this semester and don't remember using intermediate, but I'll agree with you both.

    but lets make it more complicates


    mintresult = (((1 + 2 + 3)*4)^2)
    ------------------------


    x = 1
    y = 2
    z = 3

    (((X + Y + Z)*(y^y))^Y)

    I like my way better.
    Vini, Vidi, Vici!
    -----------------
    say this 5 times fast
    "I am not a pheasant plucker, I'm a pheasant plucker's son. I'm only plucking pheasants, till the pheasant plucker comes."

  8. #8
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    ???????? *** i cannot understand that for the life of me
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  9. #9
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    LOL, Nullus now you and Guv are the maths guys around here.

  10. #10
    nullus
    Guest
    think i'll be allowed to be the moderator of the Maths forum now?

  11. #11
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Yeah, they need some fresh blood down there.

  12. #12
    nullus
    Guest

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