Advertisement
31ph4n70m

minimun_of_two.coffee

Nov 21st, 2019
3,873
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # coffeescript solution to codeabbey challenge 4
  2. i1 = 30
  3. i2 = "3539875 -2913804
  4.     9970403 -1271892
  5.     2259745 -5041103
  6.     6135274 6702733
  7.     -7705887 7333693
  8.     9011193 -5815604
  9.     -4443223 -3369396
  10.     6454782 5927252
  11.     8752154 8363617
  12.     -4610650 9748221
  13.     6825533 -3597316
  14.     6931901 7542523
  15.     -2603266 9437222
  16.     5903501 9517359
  17.     -8975159 -2311126
  18.     8014504 4564716
  19.     4775069 7984907
  20.     -6707176 -2965185
  21.     -7056195 9428098
  22.     -6262451 -4762083
  23.     6761791 -7251257
  24.     -577687 -7681432
  25.     -620653 -4122904
  26.     8245820 -1868499
  27.     -5759287 -6364830
  28.     -2120277 -8933753
  29.     37854 -5188376
  30.     8608770 7434587
  31.     -5751153 4512272
  32.     6951946 -4726312"
  33. i3 = i2.split " "
  34. o = ""
  35. count = 0  
  36. while count < i3.length
  37.   o = o + (Math.min i3[count], i3[count+1])  + " "
  38.   count = count + 2
  39.  
  40. console.log o
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement