subject
Computers and Technology, 05.09.2020 05:01 mccdp55

A variable like userNum can store a value like an integer. Extend the given program to print userNum values as indicated. (1) Output the user's input. Enter integer: 4 You entered: 4(2) Extend to output the input squared and cubed. Hint: Compute squared as userNum * userNum. (Submit for 2 points, so 4 points total).Enter integer: 4 You entered: 44 squared is 16 And 4 cubed is 64 Enter another integer: 5 4 + 5 is 9 4 * 5 is 20import java. util. Scanner;public class OutputWithVars {public static void main(String[] args) {Scanner scnr = new Scanner(System. in);int userNum = 0;System. out. println("Enter integer: ");userNum = scnr. nextInt();return;}}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:00
What season was better from fortnite?
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the can apple do to fix this issue?
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
Answers: 1
You know the right answer?
A variable like userNum can store a value like an integer. Extend the given program to print userNum...
Questions
question
History, 13.05.2021 20:40
Questions on the website: 13722367