Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Visual C# Question: Exponents
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rar




PostPosted: Mon Jun 28, 2010 12:49 pm   Post subject: Visual C# Question: Exponents

Alright, anywhere I've looked it says to look at Math.Pow for using exponents.
I don't understand Math.Pow though, so how would anyone suggest I do exponents in Visual C#?

(I'm making a calculator for learning purposes, so I'd like a square root button. To my knowledge, the only way to do this is to raise to the power of 0.5).
Sponsor
Sponsor
Sponsor
sponsor
TerranceN




PostPosted: Mon Jun 28, 2010 1:05 pm   Post subject: RE:Visual C# Question: Exponents

No offence meant, but Visual C# tells you that you need to pass two arguments, so why don't you try putting in some numbers and seeing what results you get?

Also you are correct, something raised to 1/x is the same as the xth root.
rar




PostPosted: Mon Jun 28, 2010 1:07 pm   Post subject: RE:Visual C# Question: Exponents

I apologize, the example I found was written in a complex state and I missed how very easy it was to use Math.Pow. Problem solved, once again. I really should stop posting until I've searched for things for a whole day...
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: