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
The method needed to arrange for an object to be notified when a window's close-window button has been clicked is
Readme [11.4K]
The correct answer that would best complete the given statement above would be the term addWindowListener. <span>The method needed to arrange for an object to be notified when a window's close-window button has been clicked is addWindowListener. Hope this is the answer that you are looking for. </span>
7 0
3 years ago
Hellpppppppppppppppp
jonny [76]

Answer:

i can't see your problem

6 0
2 years ago
Read 2 more answers
What is the full form of html​
zepelin [54]

Answer:

Hypertext Markup Language

Explanation:

Hypertext Markup Language

5 0
2 years ago
Read 2 more answers
Write a declaration of a variable named count that can be used to hold numbers like 90000 and -1 and -406.
Andreyy89
Which language? In Java it would simply be:

int count;
7 0
2 years ago
Match each term with the statement that best describes it.
chubhunter [2.5K]

Answer:

Field: A placeholder for information that changes

Explanation:

The are on the page where we write our information. Each page consist of field area where we write text, insert figures and tables.

Table: A grid of columns and rows that you can fill with text and graphics

Explanation:

The arrangement of row and columns to organize the information for the purpose of analyzing and comparing is called Table.

Section break: A formatting mark that divides a document into parts that can be formatted

Explanation:

If we want to divide the document in terms of formatting, we apply section breaks in the document. e.g. If we are writing a document in landscape mode and want to insert few pages in portrait mode then we apply section break.

Header: Text or graphics that appear at the top of every page in a document

Explanation:

The place at the top of the page, where we want to insert some text that should be fixed on each page such as page number, chapter name or book name. We use header.

Manual page break  of the next page: A formatting mark that forces the text following the mark to begin at the top

Explanation:

If we complete the working on one page and want to start work on new page. we apply page break so that any change in formatting of the previous page could not affect the new page.

Footer:Text or graphics that appear at the bottom of every page in a document

Explanation:

The place at the bottom of the page, where we want to insert some text that should be fixed on each page such as page number.

Bibliography: A list of the sources used to create a document

Explanation:

The list of sources that we use to complete our document, from we read some literature to support our arguments. It has been added at the end of the document.

Citation:  A parenthetical reference in the document text that gives credit to a source

Explanation:

The information that we read from other document and insert in our document, assign it a reference to insert in bibliography section.

Margin: The blank area between the edge of the text and the edge of the page

Explanation:

The space between text and edges of the the page from top, bottom, left and right side is called margin.

6 0
2 years ago
Other questions:
  • Which data type stores images and audio visual clips?
    9·2 answers
  • Jenis-jenis grafik bagi imej​
    10·1 answer
  • On laptops with a smart card reader installed, where is the smart card reader usually located?
    13·1 answer
  • The type of database that is connected by a company's local area networks is a(n:
    11·1 answer
  • What is social media ​
    13·2 answers
  • Which of the following is a sample IPv4 address?
    14·1 answer
  • Credence is a student in college.
    13·2 answers
  • Which of the following candidates would most likely be hired as a graphic artist?
    15·2 answers
  • I created a brainly account and forgot everything I mean everything so I cannot log back on and my debit Card is currently about
    11·2 answers
  • Write a program that asks the user for the name of a file. The program should display the contents of the file with each line pr
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!