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
Bacteria is being grown in a petri dish. The number bacteria B after t hours can be modeled by B(t) = 150e^0.585t. What is the i
Elina [12.6K]
  1. The initial number of bacteria present is equal to 270 bacteria.
  2. The number of bacteria that will be in the petty dish after 12 hours is 167818 bacteria.

<h3>What is an exponential function?</h3>

An exponential function can be defined as a mathematical function whose values are generated by a constant that is raised to the power of the argument. Mathematically, an exponential function is represented by this formula:

f(x) = eˣ

<h3>How to calculate the initial number of bacteria?</h3>

B(t) = 150e^0.585t

When t = 1, we have:

B(1) = 150e^0.585(1)

B(1) = 150e^0.585

B(1) = 269.25 ≈ 270 bacteria.

<h3>How many bacteria will be in the petty dish after 12 hours?</h3>

B(12) = 150e^0.585(12)

B(12) = 150e^7.02

B(12) = 167817.99 ≈ 167818 bacteria.

Read more on exponential functions here: brainly.com/question/27866047

#SPJ1

5 0
1 year ago
Type your response in the box.
wel

Answer:

Humans belong in the chordata phylum because they meet on the criteria listed on the chart (multicellular, tissues, vertebrae). Each requirement for each phylum also applies to the categories on the right. Because humans are one of the most complex life forms, it only makes sense that we're in the most complex phylum.

8 0
2 years ago
One benefit of statistics is that it can limit an individuals preception. <br> T or F?
MissTica

Manipulating stats can limit an individuals perception, so true
6 0
2 years ago
PLS HELP IM ON MY LAST QUESTION AND MY MOM WON'T LET ME EAT DINNER UNTIL I FINISH AND I GET AN A
Scrat [10]

Answer:

Freezing

Explanation:

Hope it helps you........

6 0
2 years ago
For a marketing research study to have validity, it must _____. A assure survey respondents that all results are confidential B
egoroff_w [7]

For a marketing research study to have validity, it must actually measure what it sets out to measure.

Explanation:

When it comes to research, we need to make sure that the measures we are using are reliable and valid.

Reliability refers to consistency across time, items, and researchers. Validity refers to what degree the results of the research reflect what they are intended to reflect (if the research actually measures what it has set out to measure). There are three main types of validity:

  • face validity - the extent to which the research actually measures what it's supposed to measure;
  • content validity - the extent to which a measure represents all aspects of the researched phenomenon;
  • criterion validity - whether the results of the research correlate with other variables they are expected to be correlated with and not correlated with variables they are not expected to be correlated with.

Learn more about the use of databases in research: brainly.com/question/2735192

#LearnWithBrainly

6 0
3 years ago
Other questions:
  • How is virtual learning different
    9·2 answers
  • Seeing a snake, experiencing increased heart rate and rapid breathing, and then becoming frightened is the sequence of events po
    10·1 answer
  • Upon contact with Europeans, Native American social structures were undermined by...
    10·1 answer
  • Which of the following rows accurately compares the political system in the united states to the french parliamentary system?
    14·1 answer
  • All of the following statements about the Ottoman Empire in the period 1450–1750 are factually accurate. Which would most strong
    11·2 answers
  • The joint found between the 4th middle and distal phalange?
    14·2 answers
  • 12+9-8=?<br><br>Who is part of the LGBTQ+ <br><br>do not answer if no.<br><br>I AM!!!
    8·2 answers
  • From what do both the NATO and Warsaw Pact treaties derive their legitimacy?
    11·1 answer
  • Question
    8·1 answer
  • Which section of ocean floor is near the coastlines of all continents?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!