1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anni [7]
3 years ago
9

2.10 zyLab training: Basics (Java)

Computers and Technology
1 answer:
Triss [41]3 years ago
7 0

Answer:

import java.util.Scanner;

public class NumSquared {

public static void main(String[] args) {

Scanner scnr = new Scanner(System.in);

int userNum = 0;

int userNumSquared;

userNum = scnr.nextInt();

userNumSquared = userNum * userNum; // Bug here; fix it when instructed

System.out.println(userNumSquared); // Output formatting issue here; fix it when instructed

}

}

Explanation:

For case 1 you can in initialize the input with a number as have done.

For case 2, I changed the '+' to '*' so that I can get the square as required by the question

For case 3, I used a println(), because it will print the value of UserNumSquared and also print a new line.

You might be interested in
Which of the following is a template definition?
musickatia [10]

Answer:

b. template<classT>.

Explanation:

Template functions are that can work with generic types. Template lets us to create a function so that more than 1 type or class can adapt  the functionality of that function.

We can write the template function as following:-

template<class typename>.

It matches to the option b.

5 0
3 years ago
Contextual targeting method mean
Semenov [28]
Definition - What does Contextual Advertising mean? Contextual advertising is a form of online advertising that displays ads on websites based on the keywords, content or theme of the website. It is a targeted advertising technique that is commonly used in ads on blogs, websites and other online media.
3 0
3 years ago
Anyone know how to fix this problem on Microsoft Team?
lesya [120]

Answer:

Wait for some time and reload the page

Fix the corrupted file

The file is deleted before finishing upload

Clear browser cache.

Explanation:

7 0
3 years ago
Read 2 more answers
Which of the following is not a web browser? A. safari B. explorer C. chrome D. google​
Brums [2.3K]

Answer:

D) Google

Explanation:

Google on it's own is a search engine. Safari, Explorer, and Chrome are web browsers.

I hope it helps :)))

7 0
3 years ago
Read 2 more answers
What will the following code display? #include using namespace std; void doSomething(int); int main() { int x{2}; cout &lt;&lt;
Leno4ka [110]

Answer:

The code will display the following on the screen:-

2

0

2

Explanation:

The output is like this because x{2} assigns the value 2 to the integer x.First the value of x is printed on the screen that is 2 and that newline is used to go to the next line.After that function is called doSomething with x passed as the argument. doSomething function assigns the value zero to the variable passed and prints it on the screen.So the next line is 0.Since x is passed by value so no changes will appear in the original argument.Hence the last line printed is 2.

8 0
3 years ago
Other questions:
  • Alpha Technologies, a newly established company, wants to share information about its work with people all over the world. Which
    9·1 answer
  • 11. John wants to share resources and move a large volume of data quickly over the Internet. John should use which of the follow
    14·1 answer
  • In the single-site processing, single-site data (SPSD) scenario, all processing must be done on the end user's side of the syste
    10·2 answers
  • If you're unsure if something
    9·2 answers
  • To gain a competitive edge this year, the upper management of a global IT company has decided to focus on customer service, empl
    13·1 answer
  • Why, y did brainly just do that........or did it just happen to me
    12·2 answers
  • Your organization network diagram is shown in the figure below. Your company has the class C address range of 199.11.33.0. You n
    8·1 answer
  • Classify the various scenarios in a web development team that is creating a website for a client according to the priority level
    9·1 answer
  • How do you make a minecraft server. just the basics please. I only need ine for me and my friends.
    7·2 answers
  • What is the value of x after running this code?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!