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
What is the element<br> that has 6 protons 7 neutrons and 7 electrons
navik [9.2K]

Answer:

Carbon atoms

Explanation:

Mass no. of an element= no. of protons + no. of neutrons = 6 + 7 = 13

Atomic no. = no. of protons/electrons = 6

There is an unbalanced situation between the neutron no and proton no. so this has to be an isotope of Carbon-12, and this element is Carbon-13.

4 0
3 years ago
Read 2 more answers
1) Most important changes in the Middle East between 13th &amp; 15th centuries?
kupik [55]

Important changes in the Middle East between the 13th and 15th centuries include the 13 Century end of the First Crusade and the capture/founding of Jerusalem. After that came the rise of the Mongol/Turkish/Ottoman Empire during the 14th Century. The Ottoman transcontinental Empire controlled much of North Africa, Western Asia, and Southeast Europe. This led to the creation of important transcontinental trade routes and a boom of economic trade between the continents.

Pushing the Mongols north and fighting them, and the rebuilding of Beijing caused the Chinese decision to abandon major expeditions.

7 0
3 years ago
Soooo.... I just took an iq test .....
Vilka [71]

Answer:

6 is on the bottom and you are right, c lied and b cheated

Explanation:

7 0
3 years ago
Read 2 more answers
The lake at point A in the diagram is one of the primary points of recharge for the aquifer. Assuming the maximum rate of rechar
Lady bird [3.3K]

Answer:

The soil of the region A (given in the attachment) must have coarse grain sand and gravel deposits.

Explanation:

The remaining part of the question is attached here

Solution

Most of the aquifers are recharged by rainfall or either the surface water that penetrates through the soil into the ground and reaches the aquifer. Hence, the soil type in these regions must be permeable. Gravel and coarse sand along with medium seize sand particles have high permeability. Hence, the soil of the region A (given in the attachment) must have coarse grain sand and gravel deposits.  

6 0
3 years ago
Ubiór i wygląd zewnętrzny Bernarda Zygiera ( syzyfowe prace)
Vinil7 [7]
Ubidor anf wihger scholden
5 0
3 years ago
Other questions:
  • What is another word for "procrastinate"?
    5·1 answer
  • Which country has the lower BMI? Does this country also have the lowest caloric intake? How would you describe this country?
    10·1 answer
  • After World War I, Allied leaders sought to organize Europe into nation-states. How did they approach their task, and how succes
    12·2 answers
  • Which theory of personality believes the LEAST in personality change?
    8·2 answers
  • Laws that require juveniles accused of certain crimes to be tried as adults are called
    9·1 answer
  • based on the pattern of trade in the third paragraph, the Egyptian karim merchants were most likely directly involved in which o
    13·1 answer
  • The blue is my guess
    8·1 answer
  • Which point on the Production Possibilities Curve (PPC) is considered INEFFICIENT or
    6·1 answer
  • Look for the main ideas in this passage about people who don’t like how circuses treat animals.
    13·2 answers
  • Baa Baa , the black sheep had 7 pounds of wool. if he seperated the wool equaly , how much wool woud be in 2 bags
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!