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
Integer a = 1; Integer b = 2; Integer c; c = (a*a) + (b*b) + (2*a*b);
Integer a = 1; Integer b = 2; Integer c = Math.pow(a, 2) + Math.pow(b, 2) + (2 * a * b);
There is no methods available for a raise to power b, so we can do with this below approach:
If this solves your problem, kindly mark it as the best answer.
Thanks,
Vatsal
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_math.htm#apex_System_Math_pow
then the answer can be seen is c=9
c=(a*a)+(b*b)+(2*a*b)