Advertisement
danzylrabago

MathPow

Mar 25th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. using System;
  2. class Exercise1
  3. {
  4.  
  5. public static double test(double a, double b) {
  6. double computeSqaures;
  7. double computeProduct;
  8. double answer;
  9. computeSqaures = Math.Pow(a,2) + Math.Pow(b,2); // computing power using POW function
  10. computeProduct = 2*a*b; // computing product 2*a*b
  11. answer = computeProduct + computeSqaures;
  12. return answer;
  13. }
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement