1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

繰り返し処理を2通りで実装しました。

課題:iを0から9まで10回ループするプログラムを作成しなさい。

while文

# while

i = 0

while i < 10 do
  puts "Hello"
  i += 1
end

times文

10.times do |i|
  puts "#{i}: hello"
end
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?