CHILL 소스코드

2008. 9. 17. 03:14카테고리 없음

--LUA 5.x by CHILL CODE

-- for X = 99 to 2
-- X Bottles of beer on the wall, X bottles of beer.
-- Take one down and pass it around, [X-1] bottles of beer on the wall.
-- for X = 1
-- X Bottles of beer on the wall, X bottles of beer.
-- Take one down and pass it around, no more bottles of beer on the wall.
-- for X = 0
-- No more bottle of beer on the wall. No more bottles of beer...
-- Go to the store and buy some more...99 bottles of beer.

for i = 99, 2 do
write( i.." Bottles of beer on the wall, "..i.." bottles of beer." )
write( "Take one down and pass it around, "..(i-1).." bottles of beer on the wall." )
end
write( "1 Bottles of beer on the wall, 1 bottles of beer." )
write( "Take one down and pass it around, no more bottles of beer on the wall." )
write( "No more bottle of beer on the wall. No more bottles of beer... " )
write( "Go to the store and buy some more...99 bottles of beer." )


CHILL 에 대한 개념설명이 필요하시다면 댓글 달아주세요 :)

출처 - 외국 어느 홈페이지 -_-;