Home All Groups Group Topic Archive Search About

Raised To The Power Of!

Author
10 Oct 2005 3:55 PM
Arpan
How do I find out the value of one number raised to the power of
another number? For e.g. how do I find out the result of 5 raised to
the power of 4 (or 5^4) i.e. 5*5*5*5 (which is 625)?

Thanks,

Arpan

Author
10 Oct 2005 3:59 PM
Dave
This sort of thing is really silly, did you try to work it out?
obviously the answer is no!

try
?5^4
in the immediate window

Regards
Dave.


Show quoteHide quote
"Arpan" <arpan***@hotmail.com> wrote in message
news:1128959750.252861.27980@g44g2000cwa.googlegroups.com...
> How do I find out the value of one number raised to the power of
> another number? For e.g. how do I find out the result of 5 raised to
> the power of 4 (or 5^4) i.e. 5*5*5*5 (which is 625)?
>
> Thanks,
>
> Arpan
>
Author
10 Oct 2005 4:10 PM
Arpan
I did try it out Dave before putting forward my post. Posting a query
without trying it out is not my cup of tea! Had that been the case, I
would have posted a thousand questions everyday!

& God knows why do you find it silly!

Anyways, thanks for your suggestion.

Regards,

Arpan
Author
10 Oct 2005 4:20 PM
Rick Rothstein [MVP - Visual Basic]
> I did try it out Dave before putting forward my post. Posting a
query
> without trying it out is not my cup of tea! Had that been the
case, I
> would have posted a thousand questions everyday!
>
> & God knows why do you find it silly!

It appears "silly" because you knew enough to write it out in what
is correct syntax for VB, namely, 5^4; but you didn't appear to
have tried it out (at least as far as one could tell from your
initial posting) to see if it would in fact work or not. Now,
however, you are saying you did try it out prior to posting. That
is confusing as the syntax is exactly right and I cannot think of
anything you could have done during testing to screw it up.
Perhaps if you showed what you tried, we might be able to correct
some misunderstanding you have about VB and its syntax.

Rick
Author
10 Oct 2005 4:02 PM
MikeD
"Arpan" <arpan***@hotmail.com> wrote in message
news:1128959750.252861.27980@g44g2000cwa.googlegroups.com...
> How do I find out the value of one number raised to the power of
> another number? For e.g. how do I find out the result of 5 raised to
> the power of 4 (or 5^4) i.e. 5*5*5*5 (which is 625)?

You answered your own question.  Use the ^ operator.

Debug.Print 5 ^ 4


--
Mike
Microsoft MVP Visual Basic
Author
10 Oct 2005 5:36 PM
Tim Rude
Hey dude, what's with the ! at the end of every subject line you post?

Do you really think every question you pose is really that exciting?

Or are you using it as a type declaration character, declaring to the world
with each post that you are Single?

Frankly, it's a bit irritating.
Author
10 Oct 2005 6:22 PM
Arpan
Well, Dave, I must confess now that my post was very silly.....rather
the silliest one can ever come across! Actually I was going through an
ASP book which listed the Math functions that are supported in VBScript
& strangely ^ wasn't listed! That's why I started experimenting with
loops & other stuff but couldn't get the end result; so I posted the
query. I was trying to touch my nose by taking my hand behind my head &
across the ear instead of touching it in the straight forward way.

Very very sorry for the silly post.

Regards,

Arpan
Author
11 Oct 2005 1:43 AM
IWP506
Arpan wrote:
> Well, Dave, I must confess now that my post was very silly.....rather
> the silliest one can ever come across! Actually I was going through an
> ASP book which listed the Math functions that are supported in VBScript
> & strangely ^ wasn't listed! That's why I started experimenting with
> loops & other stuff but couldn't get the end result; so I posted the
> query. I was trying to touch my nose by taking my hand behind my head &
> across the ear instead of touching it in the straight forward way.
>
> Very very sorry for the silly post.
>
> Regards,
>
> Arpan

It was a really funny misunderstanding, though.

iwp506