Last active
December 2, 2018 12:45
-
-
Save alexandersazonof/8d6c2d54e5533f1ea8d7aca0dae7410c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Дан целочисленный массив. Осуществить циклический сдвиг элементов массива влево на одну позицию | |
number_array = [1, 2, 3, 4, 5] | |
puts "before : #{ array }" | |
puts "after shift : #{ array.push( array.shift ) }" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Хорошо, только сделай более осмысленный вывод пожалуйста!
Что-то типа: исходный массив, массив после циклического сдвига ...