入力して配列に入れるソースコードです
puts "データの入力個数を入力してください"
num1 = gets
num = num1.to_i
array1 = []
for i in 0...num do
data = gets
array1.push(data)
end
num2 = array1.length
for j in 0...num2 do
puts array1[j]
end
Go to list of users who liked
入力して配列に入れるソースコードです
puts "データの入力個数を入力してください"
num1 = gets
num = num1.to_i
array1 = []
for i in 0...num do
data = gets
array1.push(data)
end
num2 = array1.length
for j in 0...num2 do
puts array1[j]
end
Register as a new user and use Qiita more conveniently
Go to list of users who liked