+ 1
how to print numbers in reverse using Ruby for loop. like 10 to 0.
Question edited. Give me an example to print in reverse like 10 to 0. Output 10 9 8 7 6 5 4 3 2 1 0 In Ruby. https://code.sololearn.com/cYH588x3vUa1/?ref=app
2 Respostas
+ 3
10.downto.(0) {|i| puts i}