Question: Create a List of Cubed Numbers Given five ( 5 ) numbers by the user stored in num 1 , num 2 , num 3

Create a List of Cubed Numbers
Given five (5) numbers by the user stored in num1, num2, num3, num4, and num5:
Create a List called cubedNums.
Store the cube of each user-provided number as an element of the cubedNums List.
Finally, return the cubedNums List containing the cubed values of the input numbers.
Solution
Reset
Java
Sample Test Case #1
1
2
3
4
5
Execute code
STDOUT
Expected STDOUT
[1,8,27,64,125]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!