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, 22.06.2019 01:30
Imagine that you have a friend who is starting a small business and is interested in using social media to spread the word. he is not certain that it is a good move, and has come to you for . would you advise him to use social media to advertise his business? why or why not? support you answer with information from the text.
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Select the correct answer from each drop-down menu. which types of computer networks are bigger as well as smaller than a man? a man is a network of computers that covers an area bigger than a , but smaller than a .
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Suppose you are an ad-serving company and you maintain a log of cookie data for ads you serve to the web pages for a particular vendor (say amazon). a. how can you use this data to determine which are the best ads? b. how can you use this data to determine which are the best ad formats? c. how could you records of past ads and ad clicks to determine which ads to send to a given ip address? d. how could you use this data to determine how well the technique you used in your answer to part c was working? e. how could you use this data to determine that a given ip address is used by more than one person? f. how does having this data give you a competitive advantage vis-à-vis other ad-serving companies?
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
Mathematics, 05.12.2020 04:20
question
History, 05.12.2020 04:20
question
Mathematics, 05.12.2020 04:20
question
History, 05.12.2020 04:20
question
Mathematics, 05.12.2020 04:20
question
Computers and Technology, 05.12.2020 04:20
question
Mathematics, 05.12.2020 04:20
Questions on the website: 13722360