適切に実行されないプログラムで立ち往生しています。これが私のコードです:
puts '<Input greeting below>'
answer = gets.chomp
if answer == 'Hello' || 'Hi'
answer == true
else
answer == false
puts 'Hey, how are you?'
answer2 = gets.chomp
if answer2 == 'I\'m good' || 'I\'m doing well'
answer2 == true
else
answer2 == false
puts 'That\'s good. Would you like to know facts about ruby programming?'
answer3 = gets.chomp
if answer3 == 'Sure'
answer3 == true
else
answer3 == false
puts 'Ok, well did you know that {hello, world} was the first program ever made?'
answer4 = gets.chomp
if answer4 == 'Yes'
answer4 == true
else
answer4 == false
puts 'Wow, you\'re pretty good! Would you like to know another fact?'
answer5 = gets.chomp
if answer5 == 'Sure'
answer5 == true
else answer5 == false
puts 'Alright, did you know the programming language "Ruby"
was developed by a Japanese techonolgist named "Yukihiro Matsumoto"
because he wasn\'t satisfied with the other programming languages?'
end
end
end
end
end
Windows CMD によると、29 行目の「終了」部分に問題があるとのことです。私はそれを理解することはできません。誰か助けてくれませんか?