Skip to content

Instantly share code, notes, and snippets.

@MateusAndraste
Created March 24, 2023 14:31
Show Gist options
  • Save MateusAndraste/b8e14e6cb4c4b16a5f5464f111e720d5 to your computer and use it in GitHub Desktop.
Save MateusAndraste/b8e14e6cb4c4b16a5f5464f111e720d5 to your computer and use it in GitHub Desktop.
Desafio Cálculo com Potência em Ruby
numbers = []
print 'Informe um número '
numbers.push(gets.to_i)
print 'Informe outro número '
numbers.push(gets.to_i)
print 'Informe outro número '
numbers.push(gets.to_i)
pontecies = numbers.map do |x|
x**3
end
puts pontecies.to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment