Created
March 24, 2023 14:31
-
-
Save MateusAndraste/b8e14e6cb4c4b16a5f5464f111e720d5 to your computer and use it in GitHub Desktop.
Desafio Cálculo com Potência em Ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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