Skip to content

Instantly share code, notes, and snippets.

@DamirSvrtan
Forked from shime/četvrti_zadatak.rb
Created February 25, 2012 12:33
Show Gist options
  • Save DamirSvrtan/1908318 to your computer and use it in GitHub Desktop.
Save DamirSvrtan/1908318 to your computer and use it in GitHub Desktop.
### Ispišite sve brojeve od 1 do 100, svaki u svom redu
### Ispišite brojeve od 17 do 32 u jednom redu, odvojite ih zarezom
### Ispišite random brojeve od 50 do 110 u jednom redu, odvojite ih zarezom
(1..100).each do |i|
puts i
end
(17..32).each do |i|
print "#{i}, "
end
print (50..110).to_a.shuffle.join(', ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment