John-Li/my_programs — comment on commit e7786faeabcb265174c51413c40c8ab4c81c5f4d
File: book/task3-7.rb line 18
By gmile:

Еще проще:

```ruby
a = (a+b)/2
b = a*b*2

a, b = b, a if a < b
```