Skip to content

Instantly share code, notes, and snippets.

@lrlucena
Created April 19, 2016 14:05
Show Gist options
  • Save lrlucena/dfab9ad7ba7c09addd020da45580dbbc to your computer and use it in GitHub Desktop.
Save lrlucena/dfab9ad7ba7c09addd020da45580dbbc to your computer and use it in GitHub Desktop.
def fc(x,y)
s=0
a = x.split(“”)
for i in a do
if (y==a[i]) then
s = s + 1
end
end
return s
end
x = fc(NOME,”A”)+1
y = fc(NOME,”E”)+1
puts x*y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment