|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Raised To The Power Of!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 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 > 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 > I did try it out Dave before putting forward my post. Posting a It appears "silly" because you knew enough to write it out in whatquery > 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! 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 "Arpan" <arpan***@hotmail.com> wrote in message You answered your own question. Use the ^ operator.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)? Debug.Print 5 ^ 4 -- Mike Microsoft MVP Visual Basic 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. 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 Arpan wrote:
> Well, Dave, I must confess now that my post was very silly.....rather It was a really funny misunderstanding, though.> 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 iwp506 |
|||||||||||||||||||||||