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
EXTRA POINTS!!!
ad-work [718]

The concept of continuity relates to historical developments and processes because historians can link the happenings in the past to recent occurrences.

  • The concept of continuity simply explains the continuation of a cycle and it shows the connection that exists between historical events.

  • Changes take place at different times which are then linked forward and backward in time. Continuity refers to the continuance of themes.

  • The concept of continuity is vital as historians are able to link what has occurred earlier to the recent things that are happening. For example, Islam had an influence on African culture and its development.

In conclusion, continuity is important to historians.

Read related link on:

brainly.com/question/15498027

6 0
1 year ago
Why did the Chinese fail to foresee the threat that European expansion would pose for the rest of Asia and finally for China its
Anastasy [175]
The Chinese failed to foresee that the European expansion would rival their rise because the Chinese did not see the importance of voyages across oceans. The Europeans were out to discover new lands, resources and colonies. The Chinese were thinking about how to bring together their nomads.
8 0
3 years ago
When you check your lights, you should ensure that all the lights work and the lenses are clean.
Nastasia [14]

Answer: True

Explanation: True

3 0
3 years ago
Read 2 more answers
What I Know Directions. Read the questions carefully. Choose the letter of the correct answer. Ilse a separate sheet.
kupik [55]

Explanation:

1. option c target games

2. option b Chinese garter

3. option d 2

4. option b. It can be used to revive another player or be used to continue to play on if the ball hits him/her.

5. option a deflectors

6. option c do not warm up

7. option a tumbang Preso.

<em>hope </em><em>this</em><em> answer</em><em> helps</em><em> you</em><em> dear</em><em>.</em><em>.</em><em>.</em><em>.</em><em>may </em><em>u </em><em>have</em><em> a</em><em> great</em><em> day</em><em> ahead</em><em>.</em><em>.</em><em>take </em><em>care </em><em>!</em>

7 0
3 years ago
Compare and contrast United States society in the 1920’s and the 1950’s with respect to two of the followings:
Sergio039 [100]

Race relations would be seperated between the white and black. Role of women would be to do housework. And i'm not sure for the Consumerism

3 0
3 years ago
Other questions:
  • What is the distance between A and B on the number line below? 0.55 0.65 2.48 4.85
    5·2 answers
  • TJ and Colton have to fold letters and then seal envelopes for a political campaign. It takes TJ 40 seconds to fold a letter but
    14·1 answer
  • The Sun appears to move across the sky during the day. The best explanation for this apparent motion is that Earth is
    15·2 answers
  • 1. Roxanne loved the band Metallica. However, one time when she and her friends were
    8·1 answer
  • Color Number of Skittles Percent Frequency Degree green 25 25% orange 18 18% red 16 16% yellow 18 18% grape 26 26% Total 100 100
    7·1 answer
  • Find the values of x and y <br> 9x-18i=-36+6yi
    12·2 answers
  • Write an essay due Friday nov/13/20
    10·1 answer
  • PLEASE HELP ME!!! I NEED THIS SO I CAN PASS MY CLASS AND I ONLY HAVE TEN MINS LEFT!!!! Comparing the four most common types of p
    12·1 answer
  • Which feature of “What Happened on the Trail of Tears?” is the focus of “Thunder in Our Hearts”?
    9·2 answers
  • Income alone does not give the full picture of standard of living. Why not?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!