SHARE
TWEET

Untitled

a guest May 21st, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve (a , b, c) {
  2.  bigger = 0
  3.  middle = 0
  4.  smallest = 0
  5.  
  6.  if (a > b & a > c) {
  7.      bigger = a
  8.      if(a > b & a<c) {
  9.          middle = a
  10.      }else if (a<b & a<c){
  11.          smallest = a
  12.      }
  13.  } if (b > a & b > c){
  14.      bigger = b
  15.      if(b>a & b<c){
  16.          middle = b
  17.      }else if (b<a & b<c){
  18.          smallest = b
  19.      }
  20.  }else if (c>a & c>b){
  21.      bigger = c
  22.      if(c>a & c<b){
  23.          middle = c
  24.      }else if (c<b & c < a ){
  25.          smallest=c
  26.      }
  27.    
  28.  }
  29.  console.log(bigger , middle,smallest)
  30. }
  31. solve(2,1,4)
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