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
miskamm [114]
3 years ago
9

Given a double variable named areaofsquare write the necessary code to read in a value , the area of some square, into areaofsqu

are and print out the length of the side of that square. however: if any value read in is not valid input, just print the message "invalid". assume the availability of a variable , stdin, that references a scanner object associated with standard input.
Computers and Technology
1 answer:
wolverine [178]3 years ago
3 0
I can solve it with Java. Here it is: 

areaOfSquare = stdin.nextDouble();
double sqrt = Math.sqrt(areaOfSquare);
if(Double.isNaN(sqrt)){
     System.out.print("INVALID");
} else {
     System.out.print(sqrt);
}
You might be interested in
Which option in a Task element within Outlook indicates that the task is scheduled and will be completed on a later
joja [24]
I think it’s in progress
5 0
3 years ago
Read 2 more answers
can I do all my work in a notebook with Penn foster or do I have to type all of the answers in that little box?
dusya [7]
Um whichever is better for you! ummm whats the point of this question?
5 0
3 years ago
Read 2 more answers
You have $5 and earn $1.75 for each roll of wrapping paper you sell. Write an equation in two variables that represents the tota
qaws [65]

Answer:

A = 5 + 1.75r

Explanation:

Amount you have = $5

Earning per roll of wrapping paper = $1.75

Let

r = number of rolls of wrapping paper

A = Total amount earned

A = 5 + 1.75r

Equation that represents the total amount A (in dollars) you have after selling r rolls of wrapping paper is

A = 5 + 1.75r

3 0
3 years ago
Where can I find information regarding different career choices in AZCIS?
Vadim26 [7]
I think Internet is the best way to search career choices. You can get a lot information.

4 0
3 years ago
What is the output of the following code? (Please indent thestatement correctly first.)
goldenfox [79]

Answer:

no output, it does not print any thing

Explanation:

if-else statement is used to execute the statement after checking the condition if the condition is true, it allows the program to execute the statement otherwise not.

in the code, define the variable with values x = 9, y = 8 and z = 7.

Then, if the statement checks the condition 9 > 9, the condition is false.

So, the program terminates the if statement and executes the next statement but there is no next statement.

the other if-else statement is within the if condition which already terminates.

Therefore, there is no output.

7 0
3 years ago
Other questions:
  • What is the f(n) runtime of the following pseudocode: sum-0 for A = N/2 downto 1 for B-1 t increment sum by B Explain: exactly w
    13·1 answer
  • Which characteristic would be best for a person seeking a career in the Telecommunications pathway?
    15·1 answer
  • Which of the following is used by credit card companies to determine APR?
    10·2 answers
  • A symbolic link is also known as a soft link and is depicted by an @ symbol appearing at the beginning of the filename when view
    7·1 answer
  • Without entering into the internet cloud or intranet cloud, how many icons in the topology represent endpoint devices (only one
    6·1 answer
  • Place the steps in order to link and place text into the document outline, effectively creating a master document.
    8·1 answer
  • What option do you use to view your presentation?
    15·1 answer
  • Who watches the show gravity falls, if you do, if you play the theme song for the first episode backwards you get a hiding messi
    11·2 answers
  • ASAP PLS HELP: I’ll give brainliest if you u answer them all correctly!!
    12·2 answers
  • Many subject elements make for simple and streamlined looking images. true or false
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!