943,541 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Marked Solved
  • Views: 3066
  • C# RSS
Sep 5th, 2009
0

how can I get a root of some number

Expand Post »
I want get a root of number in C#
what library i must to insert and what command solve it
Reputation Points: 8
Solved Threads: 0
Junior Poster in Training
polo_coins is offline Offline
63 posts
since Oct 2008
Sep 5th, 2009
0

Re: how can I get a root of some number

C# Syntax (Toggle Plain Text)
  1. System.Math.Sqrt();
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Sep 5th, 2009
0

Re: how can I get a root of some number

thanks a lot
Reputation Points: 8
Solved Threads: 0
Junior Poster in Training
polo_coins is offline Offline
63 posts
since Oct 2008
Sep 5th, 2009
2

Re: how can I get a root of some number

In addition to that : a root of a number cannot only refer to the square root, but also the cube root,... Nth root.
To do this in C# you can do something like:
C# Syntax (Toggle Plain Text)
  1. double num = 8.0;
  2. double power = 1.0 / 3;
  3. Console.WriteLine("Cube root of {0} is {1}.", num, Math.Pow(num, power));
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is offline Offline
3,735 posts
since Oct 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Nested Data Source Binding error only when List is empty
Next Thread in C# Forum Timeline: Showing Control Events In CheckedListBox





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC