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
All but one of the following statements about stored procedures is true. Which one is false? a. They consist of one or more SQL
juin [17]

Answer:

B

Explanation:

All the options above are correct about SQL except that they're NOT compiled each time they're executed. Which makes the right option, B.

8 0
3 years ago
How do I use this without the spring?
poizon [28]

Answer:

put a spring in

Explanation:

duuuuuuuu

cy

6 0
3 years ago
Write a function max_magnitude() with two integer input parameters that returns the largest magnitude value. Use the function in
storchak [24]

I wrote my code in python 3.8:

def max_magnitude(num1, num2):

   return num1 if abs(num1) > abs(num2) else num2

print(max_magnitude(-8,-2))

I hope this helps!

4 0
3 years ago
Press the _______ key to move to the next cell in a row.
slamgirl [31]

Tab is the answer! And it says i need 20 chacters to explain so im writing random stuffff



4 0
3 years ago
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. What critical detail must she ha
frozen [14]
Target audience for the brochure
4 0
3 years ago
Read 2 more answers
Other questions:
  • What types of data are commonly entered into a cell ?
    7·2 answers
  • Write a complete program to read two integers and display the number of integers that lie between them, including the integers t
    12·1 answer
  • How can I code this in Python with only if-statements? (Only allowed to use the built-in functions int(), float(), and str().)
    8·1 answer
  • Which of the following people was a member of FFA?
    7·1 answer
  • Liquid-liquid extraction is best suited to separate a mixture of compounds when:
    9·1 answer
  • Add Try/Catch error checking To make sure that the user enters valid values in your program. To catch negative values passed to
    9·1 answer
  • Kai notices his laptop is running sluggishly, so he wants to check his system resources for any issues. Which utility can he use
    11·2 answers
  • Which of the following is typiacally the last step of the mail merge process
    11·1 answer
  • The other term for template document is _______.
    13·2 answers
  • "You have created a Word document named apple.docx using Microsoft Word. What type of a file is apple.docx ? Select all that app
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!