Skip to content

Instantly share code, notes, and snippets.

@mistyrinth
Created November 14, 2018 05:55
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 mistyrinth/c21bf3e5a8d9920893bc7203d04a7387 to your computer and use it in GitHub Desktop.
Save mistyrinth/c21bf3e5a8d9920893bc7203d04a7387 to your computer and use it in GitHub Desktop.
# timesメソッド
3.times{
print("繰り返します!\n")
}
# uptoメソッド
5.upto(9){|num|
print(num, "は四捨五入して10です\n")
}
# dowmtoメソッド
100.downto(97){|num|
print(num, "点はハイスコアです!!\n")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment