SHARE
TWEET

Untitled

a guest May 21st, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function func(args){
  2.    
  3.     if(args[0]>args[1]&&args[0]>args[2]){
  4.         var a = args[0] , b = args[1] , c = args[2];
  5.     }else if(args[1]>args[0]&&args[1]>args[2]){
  6.         var a = args[1] , b = args[0] , c = args[2];
  7.     }else{
  8.         var a = args[2] , b = args[0] , c = args[1];
  9.     }
  10.    
  11.     if(a*a == b*b + c*c){
  12.         return "直角三角形";
  13.     }else{
  14.         return "非直角三角形";
  15.     }
  16.    
  17. }
  18.  
  19. console.log(func([3,4,5]));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top