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
topjm [15]
3 years ago
7

Write the code to input a number and print the square root. Use the absolute value function to make sure that if the user enters

a negative number, the program does not crash.
Advanced Placement (AP)
1 answer:
lukranit [14]3 years ago
6 0

Answer:

Explanation:

Language?

I'm assuming this is AP CS A so I'll do it in java.

import java.util.Scanner;

class Main {

public static void main(String[] args) {

   Scanner input = new Scanner(System.in);

   System.out.print("Number: ");

   int sqrtNumber = Math.abs(input.nextInt());

   double printableNumber = Math.sqrt(sqrtNumber);

   System.out.println(printableNumber);

 }

}

You might be interested in
Which of the following correctly sequences the continuum from language family to dialect?
ivann1987 [24]

Answer:

Indo-European, Germanic, English, Midland-Northern

Explanation:

4 0
3 years ago
Explain illusory<br> correlations and regression<br> toward the mean.
Marianna [84]
Answer: Refers to the perception of a relationship between two variables when only a minor or no relationship actually exists. May be fed by regression toward the mean

Explanation: found on google
7 0
3 years ago
The continent with no deforestation (besides Antarctica) is
Andru [333]
Europe has been going though deforestation since the neolitic times.
In North America deforestation can be found for example in Canada
South America is undergoing deforestation- for example in Bolivia
Asia is definitely undergoing deforestation- for example in Indonesia

so the correct answer is: none of the above!
5 0
3 years ago
During the Cold War period, the United States entered conflicts with Korea and Vietnam to prevent the spread of communism. Some
Archy [21]

Answer: B DOMINO  Theory

Explanation: It would domino effect the Soviet Union into having more power the more territory they got.

5 0
2 years ago
Effective decision-making means comparing the additional costs of alternatives with the ________. a Total costs b Diminishing ut
ahrayia [7]

Effective decision-making means comparing the additional costs of alternatives with the marginal benefits.

 

To add, <span>a </span>marginal benefit<span> is the additional satisfaction or utility that a person receives from consuming an additional unit of a good or service.</span> It is also the topmost amount he is willing to pay to consume that additional unit of a good or service.

8 0
3 years ago
Read 2 more answers
Other questions:
  • The scoring range of a CLEP exam is from?
    7·2 answers
  • Explain how the Brutus uses the<br><br> "great thinkers" to support his<br><br> argument?
    13·1 answer
  • Which of the following tasks would the International Monetary Fund (IMF) likely carry out?
    11·1 answer
  • What's the earliest mass extinction on record
    14·2 answers
  • The pattern of repeating properties of elements revealed in the period table is known as the ___________
    5·1 answer
  • The other screenshot got cut off, sorry!
    13·2 answers
  • The comprise of 1850 outlawed the slave trade in_
    15·2 answers
  • The table below shows the average monthly temperatures of a specific location:
    8·1 answer
  • Which type of loan has the accrued (added) interest paid for by the Department of Education while you are enrolled at least half
    5·1 answer
  • How long will it take for the public to accept abortion rights after the US is abolished?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!