ユーザ用ツール

サイト用ツール


ruby:01_basic:03_for_statement

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
ruby:01_basic:03_for_statement [2014/05/30 01:22] matsuiruby:01_basic:03_for_statement [2015/10/29 04:03] (現在) – [03 for文] matsui
行 1: 行 1:
 +====== 03 for文 ======
 +
 +<box 70% round left orange|for.rb>
 +<code console>
 +for i in 1..3 do
 +  print("i=", i, "\n")
 +end
 +
 +print("End")
 +</code>
 +</box>
 +
 +===== 実行 =====
 +<code console>
 + $ ruby for.rb
 + i=1
 + i=2
 + i=3
 +</code>
 +