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
dolphi86 [110]
3 years ago
8

Write a program that prompts the user for the lengths of the two legs of a right triangle, and which reports the length of the h

ypotenuse. Recall that the hypotenuse length satisfies the formula:
c =√ (a² + b²)
Computers and Technology
1 answer:
timurjin [86]3 years ago
3 0

Answer: The following code is in c++

#include <iostream>

#include<math.h>

using namespace std;

int main()

{

   float a,b,c;

   cout<<"Enter height and base of triangle\n";

   cin>>a>>b;  //reading two sides from user

   c=sqrt(pow(a,2)+pow(b,2));  //calculating hypotenuse

   cout<<"Length of hypotenuse is "<<c;  //printing third side of triangle

   return 0;

}

OUTPUT :

Enter height and base of triangle                                                                                            

3                                                                                                                              

4                                                                                                                              

Length of hypotenuse is 5  

Explanation:

In the above code, three variables a, b and c of int type are declared. After that, it is asked from user to enter the value of a and b. The user puts the value and then c is calculated with the help of Pythagoras theorem formulae which squares the values of two sides and then adds them to calculate hypotenuse of a right angled triangle and finally c is printed to console.

You might be interested in
Where is the risk of someone intercepting another person’s online activity the greatest?
sergey [27]

social networking site

3 0
3 years ago
Which application software would be most suitable for writing a resume?
Gemiola [76]

Answer:

Either word or I would suggest using google docs and word and compare.

Explanation:

You can set up a resume in word.

7 0
2 years ago
Flodding on rivers is caused by human activity rather than natural events true or false
ValentinkaMS [17]

Answer:

True

Explanation:

While I believe it's a compendium of the both(both true and false), I when asked to pick just one, I would go with yes. They're are lots of things we humans do on a general note that causes flooding. Although, heavy rainfall can also cause flooding and that's not as a result of human activity, but directly. But then, activities like not maintaining a dam, or erecting a structurally failed dam can cause flood to occur at any point in time, without warning even. Another way is when due to our activities, we block the rivers, this can also lead to flooding exactly like the case of heavy rainfall does. Lack of good drainage facilities, drainage wouldn't create itself, we as humans do. When we don't were essentially creating an excuse for an eventual happening of flood.

Succinctly put, human activities also cause floods, as much as natural events causes flood.

3 0
3 years ago
Which of these methods can you use to insert a new row in a worksheet?
vodka [1.7K]

Answer:

I think It should be B

Explanation:

If wrong so please sorry

3 0
3 years ago
Can someone please tell me how to download tor browser onto a Linux laptop?
marta [7]

Answer:

Use windows

Explanation:

7 0
2 years ago
Other questions:
  • Which of the following statements about Linux is not​ true? A. Linux works on all the major hardware platforms. B. It plays a ma
    5·1 answer
  • You can toggle between different types of references by pressing the ____ key on your keyboard.
    15·1 answer
  • Which of these sites would need additional investigation to check for reliability?
    8·2 answers
  • While creating a sketch, what helps you identify positive and negative space?
    13·1 answer
  • Which of the following is the process of writing the step-by-step instructions that can be understood by a computer?
    5·1 answer
  • What privacy risks do new technologies present,<br> and how do we decide if they're worth it?
    11·1 answer
  • Classify the functions of dhcp and dns protocols​
    14·1 answer
  • There is an interface I that has abstract class AC as its subclass. Class C inherits AC. We know that C delegates to an object o
    12·1 answer
  • Where can you find the sizing handles for a graphic, shape, or text box? Check all that apply.
    10·2 answers
  • which filename refers to a 16-bit real-mode program that queries the system for device and configuration data, and then passes i
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!