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
Virty [35]
3 years ago
15

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

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:
Tanya [424]3 years ago
4 0

Answer:

# include<math.h>

# include<stdlib.h>

# include<stdio.h>

int main()

{

    int choice;

    double area;

    printf("Enter the area of Square:");

    scanf("%lf", &area);

    printf("Enter the choice: 1, 2:");

    scanf("%d", &choice);

    switch(choice)

    {

        case 1:if(area<0.00)

                        {

                        printf(" INVALID");

                        break;

                        }

                      else

                        {

                        printf("side of square: %lf", sqrt(area));

                        break;

                       }

                       break;

        case 2: break;

    }

return 0;

}

Explanation:

Here, if area is less than 0 then invalid message is printed out. And if area is more than 0 then the sqrt is calculated and the side of a square length is being printed out. And that is what is required. lf is for double. And math.h is included to make use of the sqrt function.

You might be interested in
The term composite would be used to describe an image that was altered by the Crop tool.
patriot [66]

Answer:

Would it be false?

5 0
3 years ago
Por favor alguem poderia me falar se este Computador Gamer Fox PC FPS Intel Core i5 8GB 3.4 GHZ GeForce GTX 1050Ti 4GB GDDR5 HD
AleksAgata [21]

thats an trash computer

5 0
3 years ago
In a particular field, there are trees in a l single row from left to right. Each tree has a value V You cut trees from left to
Sedbober [7]

Answer:

i dont know help me

Explanation:

4 0
3 years ago
Read 2 more answers
Which statement describes what happens if multiple users make changes simultaneously to a presentation when coauthoring?
Marina CMI [18]

Answer:

3.

Explanation:

Co-authoring in PowerPoint is sharing a presentation and allowing your colleagues to work on it at the same time. This option of co-authoring is available when you share or save your file on OneDrive or SharePoint.

The perk of co-authoring a presentation is that PowerPoint keeps a record of all edits under the name of the author. This keeps the conflicts away.

Therefore, the correct answer is option 3.

8 0
3 years ago
Which of the following code segments could be used to skip the first two characters of an input line (they may or may not be whi
marusya05 [52]

Answer:

Following are the code in the C++ Programming Language.

cin.get(dummy);

cin.get(dummy);

cin >> inputInt;

Explanation:

In the above code that is written in the C++ Programming Language, the first two code is written for the string character input from the user and it input or not input the whitespace characters and the last one is used for the input of the integer character from the user. The character variable they used that is 'dummy' and the integer variable they used is 'inputInt'.

7 0
3 years ago
Other questions:
  • Let’s say you are given the task of retouching a famous model’s photograph. To what extent will you retouch the image? In your o
    12·2 answers
  • A _____ is a digital media file distributed over the Internet using syndication feeds for playback on mobile devices and persona
    6·1 answer
  • Shelby likes to play video games on an old Atari video game system. No matter how old the cartridge, when she inserts it into th
    14·2 answers
  • 1 Explain the difference between using a computer program and programming a computer.
    12·1 answer
  • You can run a macro by:
    10·1 answer
  • Everytime my daughter tries to ask for an app, or a money thing inside an app.. The request won't go through. Anybody know how t
    12·1 answer
  • Which position most likely requires your Master's Degree for success
    7·1 answer
  • PowerPoint Online automatically saves your presentation to what Office Online application? OneDocument OneDrive OneNote OneWay
    13·2 answers
  • The Internet:
    12·1 answer
  • This is a standard routine used to perform a mathematical task in excel is called?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!