Skip to content

Instantly share code, notes, and snippets.

@svracak
Forked from shime/četvrti_zadatak.rb
Created February 25, 2012 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svracak/1908384 to your computer and use it in GitHub Desktop.
Save svracak/1908384 to your computer and use it in GitHub Desktop.
### Ispišite sve brojeve od 1 do 100, svaki u svom redu
(1..100).each do |x|
puts x
end
### Ispišite brojeve od 17 do 32 u jednom redu, odvojite ih zarezom
puts (17..32).to_a.join(",")
### Ispišite random brojeve od 50 do 110 u jednom redu, odvojite ih zarezom
puts (50..110).to_a.shuffle.join(",")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment