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]
4 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]4 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 statements is true of e-waste in the United States?
Zinaida [17]

Answer:

C) The Environmental Protection Agency currently has federal laws in place that govern e-waste for all industrialized countries.

Explanation:

E-waste is considered to be the waste that is emitted from electronic devices. They are considered harmful for lives of animal and human beings if not disposed off properly, as the harmful material seeps through the ground and pollutes land and sea.

The  federal Resource Conservation and Recovery Act (RCRA) has laws in place which requires the hazardous materials like electronics which contain cathode ray tubes are to be disposed off properly. If not, their use should be minimized in the electronic devices and a less hazardous material should be used.

4 0
3 years ago
Read 2 more answers
I will give you a barnliest <br>what is a short-term enviormental change provide an example
Elena L [17]
A short term environment change would be drought, smog, volcanic eruptions, and blizzards. All because it only last for a small period of time and it can affect the way certain species will have to adapt to certain environments.
3 0
3 years ago
English language learners” describes children learning English as a second language.
eduard
False I believe is right.

8 0
4 years ago
Read 2 more answers
14. An example of a cognitive skill is
kvasek [131]
A. Memorizing a pattern
Because cognitive issues is with the brain and memory.
6 0
3 years ago
A goal of financial regulatory agencies is to
ikadub [295]

The correct answer is A) prevent monopolies.

Financial regulatory agencies focus on preventing monopolies because monopolies can be negative in a capitalist economy.

A monopoly is when one company has almost complete control over one specific market. For example, John D. Rockefeller was considered a monopoly by many people as his company Standard Oil controlled roughly 90% of all oil created in the US during the late 19th century. This type of control by one company can have a negative effect on the consumers. This is due to the fact that the monopoly has very little competition. Since there are few (if any) companies that can compete with the monopoly, the company that has cornered the market may have the chance to raise prices as high as they want. This is due to the fact that there is no other source to get this good from. This is why the government regulates the development of monopolies.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Consider the Mexican-American War.
    5·1 answer
  • Define options and explain their roles in the driving process.
    8·1 answer
  • Panuto: Piliin ang titik ng tamang sagot at isulat sa patlang.
    6·1 answer
  • Help mee!!<br> i neeeed answers asap!!
    13·2 answers
  • If y varies directly as x, and y =6 when x =10, find x when y=18
    7·1 answer
  • After Abraham lincoln became president , southern states the united states in order to:
    13·2 answers
  • Quincy has cancer and is having to take chemotherapy treatments that make him very ill after the treatment. A month ago, after h
    5·1 answer
  • What are you already know about climate change pushed humans back and forth across Arabia?
    15·1 answer
  • What number is halfway<br> between 5/8 and 3/4?
    8·1 answer
  • How did the Renaissance influence the Protestant reformation? Be specific.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!