subject
Computers and Technology, 18.03.2021 01:20 esta54

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: 4You 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: 4You entered: 44 squared is 16 And 4 cubed is 64Enter another integer: 54 + 5 is 94 * 5 is 20LABACTIVITY1.16.1: Basic output with variables (Java)0 / 5OutputWithVars. javaLoad default template...import 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;}}import 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;}}Develop modeSubmit modeRun your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
On the loan worksheet in cell c9 enter pmt function to calculate the monthly payment for the altamonte springs 2018 facilities loan. ensure that the function returns a positive value and set the reference to cells b5 and b6 as absolute references.
Answers: 2
question
Computers and Technology, 23.06.2019 02:30
Rafael needs to add a title row to a table that he has inserted in word. what should he do? use the alignment options. use the merge and center option for all the cells in the top row. use the merge and center option on the first two cells in the top row. none of the above
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
Design a class tictactoe that: holds the following information about the game: two-dimensional array (3 by 3), and winner. add additional variables as needed. includes the functions to perform the various operations on objects. for example, function to print the board, getting the move, checking if move is valid, determining if there is a winner after each move. add additional operations as needed. includes constructor(s). write the functions of the class, and write a program that uses the class. the program should declare an object of type tictactoe. the program will create the board and store it in the array. the program will allow two players to play the tic-tac-toe game. after every valid move update the array, check if there is a winner. if there is no winner and no tie, then print the board again to continue.
Answers: 2
question
Computers and Technology, 24.06.2019 00:40
To maintain clarity and focus lighting might be needed
Answers: 2
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
Geography, 10.02.2020 18:59
question
Arts, 10.02.2020 18:59
question
Biology, 10.02.2020 19:00
question
Biology, 10.02.2020 19:00
Questions on the website: 13722360