Ruby - Loops and Iteration
You want to print numbers 1 to 5 but skip 3 and repeat printing 4 twice using
next and redo. Which code achieves this correctly?
i = 0
while i < 5
i += 1
if i == 3
# skip 3
elsif i == 4
# print 4 twice
end
puts i
end