function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Example: calculate a square. Decimal a=4; Math.pow(a, 2);
The question is quite simple.
You can use Math.pow(number, power) method.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com
I've gone through your requirement and you can find the apex code below:
Apex code:
public class square {
//method to calculate sqaureRoot
public static void Squre(integer squareRoot)
{
System.debug(Math.sqrt(squareRoot));
}
//method to calculate square
public static void SqRoot(integer square)
{
System.debug(Math.pow(square,2));
}
}
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com