Skip to content

Instantly share code, notes, and snippets.

@mertyildiran
Created December 22, 2013 21:52
Show Gist options
  • Save mertyildiran/8088925 to your computer and use it in GitHub Desktop.
Save mertyildiran/8088925 to your computer and use it in GitHub Desktop.
Polidrom RUBY
a="merve"
b="evrem"
i=0
y=b.length - 1
saydir=0
if a.length == b.length
while i < a.length
if a[i]==b[y]
saydir += 1
end
i+=1
y-=1
end
if saydir == a.length
puts "Polidromdur."
else
puts "Polidrom degildir."
end
else
puts "Polidrom degildir."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment