To the power of...

Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: May 2008
Posts: 257
Reputation: samarudge is an unknown quantity at this point 
Solved Threads: 20
samarudge samarudge is offline Offline
Posting Whiz in Training

To the power of...

 
1
  #1
Oct 21st, 2009
Hi,
What is the function/opperator to calculate a power with C#

I tryed
  1. powerof = anumber ^ anothernumber;

and that clearly doesn't work (1^3 is 2, 2^3 is 1 etc.)

How do I do it???

I looked under Math. functions and there was nothing and I spent ages Googleing

Thanx,
Sam
My Blog, Life and everything that matters to me - SamRudge.co.uk

2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 449
Reputation: Ryshad has a spectacular aura about Ryshad has a spectacular aura about Ryshad has a spectacular aura about 
Solved Threads: 90
Ryshad's Avatar
Ryshad Ryshad is offline Offline
Posting Pro in Training
 
1
  #2
Oct 21st, 2009
Please don't take for granted the work that solvers do for you. Take the time to fully understand the code they give you so that you might adapt it to future problems.

"Learning is more than absorbing facts, it is acquiring understanding.” - William Arthur Ward
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,044
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 309
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Postaholic
 
0
  #3
8 Days Ago
Extra remark: ^ is the XOR operator, not the power of operator.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Reply

Tags
c#, math, operator

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum


Views: 540 | Replies: 2
Thread Tools Search this Thread



Tag cloud for c#, math, operator
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC