Ruby for

#!/usr/bin/ruby -w
# -*- coding: UTF-8 -*-
for i in 1..5
 print i," "
end
print " "
for i in 1...5
 print i," "
end
#
#1 2 3 4 5
#1 2 3 4
#

原文地址:https://www.cnblogs.com/sky20080101/p/6739322.html