class Match
def foundMatch x
@arr = Array[5, 3, 2, 7, 6]
for num in @arr
if(num == x)
return true
end
end
return false
end
end
m = Match.new
puts(m.foundMatch(3) ? "Found match" : "Not found match")
Y2xhc3MgTWF0Y2gKCiAgICBkZWYgZm91bmRNYXRjaCB4CiAgICAgICAgQGFyciA9IEFycmF5WzUsIDMsIDIsIDcsIDZdCiAgICAgICAgZm9yIG51bSBpbiBAYXJyCiAgICAgICAgICAgIGlmKG51bSA9PSB4KQogICAgICAgICAgICAgICAgcmV0dXJuIHRydWUKICAgICAgICAgICAgZW5kCiAgICAgICAgZW5kCiAgICAgICAgcmV0dXJuIGZhbHNlCiAgICBlbmQKZW5kCgptID0gTWF0Y2gubmV3CnB1dHMobS5mb3VuZE1hdGNoKDMpID8gIkZvdW5kIG1hdGNoIiA6ICJOb3QgZm91bmQgbWF0Y2giKQ==