Newer
Older
Ruby / mondai2.rb
@SATO Kenjiro SATO Kenjiro on 9 Jul 2022 277 bytes 2022-07-09 15:50:50
# coding: utf-8
puts"問題!"
puts"今の元号は何でしょうか?"
puts"1:昭和"
puts"2:平成"
puts"3:令和"

print"答えを入力:"
kotae=gets.chomp.to_i
if kotae==1
  puts"不正解..."
elsif kotae==2
  puts"惜しい!不正解..."
else kotae==3
  puts"正解!!"
end