Ask Experts Questions for FREE Help !
Ask
    askforhelp22's Avatar
    askforhelp22 Posts: 2, Reputation: 1
    New Member
     
    #1

    Oct 13, 2008, 09:58 PM
    What's wrong with this code?
    Dim number1 As Integer
    Dim number2 As Integer
    Dim result As Integer

    number1 = (4 * 6 ^ 4) / (10 Mod 4 - 2)
    number2 = (16 \ 3) ^ 2 * 6 + 1
    result = number1 - number2
    askforhelp22's Avatar
    askforhelp22 Posts: 2, Reputation: 1
    New Member
     
    #2

    Oct 13, 2008, 10:13 PM

    Can someone answer this please?
    devonknows's Avatar
    devonknows Posts: 1, Reputation: 1
    New Member
     
    #3

    Oct 23, 2008, 02:14 PM
    Quote Originally Posted by askforhelp22 View Post
    Dim number1 As Integer
    Dim number2 As Integer
    Dim result As Integer

    number1 = (4 * 6 ^ 4) / (10 Mod 4 - 2)
    number2 = (16 \ 3) ^ 2 * 6 + 1
    result = number1 - number2
    Have you tried

    number1 = CInt(4 * 6 ^ 4) / CInt(10 Mod 4) - 2

    As the division by zero comes in when you insert the -2 into the brackets.

    I used this code

    Code:
    number1 = CInt(4 * 6 ^ 4) / CInt(10 Mod 4) - 2
    number2 = (16 \ 3) ^ 2 * 6 + 1
    result = number1 - number2
    
    MsgBox result
    and got an answer of 2439. Unsure if that is the answer you are looking for.

    Devon

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

I need some one to tell me what's wrong and if any thing is wrong [ 12 Answers ]

My Partner And Me Have Been Having Sex For A Year Already But For 3 Months He Has Done It With Out A Condom And I Have Not Gotten Pregnant And We Really Want To Be Parents. What Is Wrong?:(

What's wrong with me [ 2 Answers ]

I am a 25 yearo old mother of three I am going to nursing school and have been stressed. I have been experiencing very horrable headaches that are located throughout the whole head, there so bad. I have been experiencing these for a few weeks now. I thought it was because of all the stress I was...

What's Wrong With Me! [ 2 Answers ]

Okay so here's the deal... lately I've been crying for now reason... I have a loss of abitit.. like I won't eat tell I think about food then I'm like I haven't ate all day I should eat.. cause I'm skinny enough... my stomach feels all funny... and I know I shouldn't but I seem to be crazing weed a...

What's wrong with my dog? [ 2 Answers ]

:confused: I have two dogs about 6-7 weeks old. Brothers. One is completely fine: playful and eats and acts like he should. The other... Well, sleeps a lot, nose isn't wet (as I hear they are supposed to be though "Old Wifes Tales"). But most of all that concerns me is that, some times it's...

What's wrong with me? [ 5 Answers ]

My problem is that when I'm hard I'm about 7inches so that's kind of normal. But its when I'm not, that I have a problem. It shrinks down to about 2-3inches. I get a complex from this, my wife doesn't think it's a problem, but to me it is. What can I do?


View more questions Search