Last post Feb 04, 2015 01:26 PM by gerrylowry
Jan 27, 2015 09:43 PM|neoaguil17|LINK
I need to a create function:
public static decimal Pow(
)But I don't find how do it...
Jan 27, 2015 11:55 PM|gerrylowry|LINK
Here is the definition for System.Math.Pow
public static double Pow( // https://msdn.microsoft.com/en-us/library/system.math.pow(v=vs.110).aspx
You could piggy back on the above; keep in mind that exceptions are possible.
public static decimal DecimalPower(decimal x, decimal y)
Double X = (double)x;
Double Y = (double)y;
return (decimal)System.Math.Pow(X, Y);
Decimal p = (Decimal)Math.Sqrt(2.0);
Decimal y = 2.0M;
Feb 02, 2015 09:57 PM|Paul Linton|LINK
But I don't find how do it...
1) What is it that you do not know how to do?
2) Do you know how to write a method that returns a result?
3) Can you write a method that adds two numbers?
4) Is this an exercise from your text book or an assignment from your tutor?
5) Have you done the previous exercises?
Feb 04, 2015 01:26 PM|gerrylowry|LINK
Archer Wang had marked LINK as the answer to your O.P.; you chose
to unmarked it.
neoaguil17, please explain why you are not satisfied with LINK so that your peers here at
forums.asp.net can fine tune your answer.
P.S.: please read http://weblogs.asp.net/gerrylowry/clarity-is-important-both-in-question-and-in-answer