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
Andrew [12]
4 years ago
10

NOTE: in mathematics, the square root of a negative number is not real; in C++ therefore, passing such a value to the square roo

t function is an error. Given a double variable named areaOfSquare write the necessary code to read in a value, the area of some square, into areaOfSquare 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".
Computers and Technology
1 answer:
blagie [28]4 years ago
3 0

Answer:

1 #include <iostream>

2 #include <cstring>

3 #include <cmath>

4  

5 #include <iomanip>

6  

7 using namespace std;

8  

9 int main () {

10  double areaOfSquare;

11  

12 cin >> areaOfSquare;

13  

14  if(areaOfSquare >= 0)

15    {

16    sqrt(areaOfSquare);

17    cout << areaOfSquare << endl;

18    }

19  else

20    {

21    cout << "INVALID" << endl;  

22    }

23  

24  

25 }

You might be interested in
2.5 code practice I need answers please
Leni [432]

Answer:

import random

a = random.randint(1,10)

b = random.randint(1,10)

answer = a * b

print (str(a) + " X " + str(b) + " = " + str(answer))

Explanation:

Happy to help you mate

7 0
4 years ago
What is the binary number system? ​
Scilla [17]
DescriptionIn mathematics and digital electronics, a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: typically "0" and "1". The base-2 numeral system is a positional notation with a radix of 2. Each digit is referred to as a bit.
6 0
3 years ago
What does a fallout appear under in a word processing program
andriy [413]

Answer:

It processes paragraphs, pages, and entire papers

Explanation:

7 0
4 years ago
What will happen to the number of returns you get if you use the NOT Boolean operator in a search?
posledela
Smaller, as it removes search results.
7 0
4 years ago
Which of the following must be true for hydropower to work?
Nastasia [14]

95% sure its there must be waves

5 0
2 years ago
Other questions:
  • For this assignment, you will create flowchart using Flow gorithm and Pseudocode for the following program example: Hunter Cell
    12·1 answer
  • The efficiency of a screw is low because of _____. width friction length height
    10·2 answers
  • I need help with Microsoft.
    6·1 answer
  • List the names of 3 computer scientists
    6·2 answers
  • 1. Multiple Choice(25 points) 1) 4’b1001 represents the following decimal number______________ a) 8 b) 9 c) 10 d) 11 2) The foll
    10·1 answer
  • Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and total. For example, if the user en
    6·1 answer
  • _KOH + _Cu(CIO3)2 - __KCIO3 +<br>_Cu(OH)2​
    12·1 answer
  • Which statement describe the advantages of using XML? more than one answer can be correct
    9·1 answer
  • 1. Answer the following questions: a. What are the different types of number system? Name them.​
    8·1 answer
  • Write a modular program that accepts up to 20 integer test scores in the range of 0 to 100 from the user and stores them in an a
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!