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
Which of the following problems is least likely to be solved through grid computing? Financial risk modeling Gene analysis Linea
gregori [183]

Answer:

Linear problems

Explanation:Grid computing is the term used in Information technology, Computer programming and Computer networks to describe the interconnection of different Computer resources in order to achieve certain specified goal. GRID COMPUTING ALLOWS COMPUTER RESOURCES TO WOK AS A SINGLE UNIT.

Grid computing can be used to solve various issues connected with the use of Computer resources such as Financial risk modelling,Gene analysis etc but least likely to be used to solve Linear problems.

6 0
3 years ago
The latest form of personal communication that most resembles a public journal is a _____.
Airida [17]
The answer is b becuase a daily blog is a daily journal
8 0
2 years ago
Read 2 more answers
The county clerk's office is writing a program to search their database for citizen records based on information about that citi
Alborosie

Answer:

The correct pseudocode to find the records of all citizens over the age of 50 is IF(age > 50).

OR EACH item IN citzlist

{

WHILE(not end of citzlist)

{

IF(age > 50)

{

DISPLAY(name)

}

}

}

If this is run, it will bring out all the names of the citizen who are over the age of 50 in the list.

Explanation:

6 0
3 years ago
Microsoft's Xbox operating system provides Xbox programmers with a set of common standards to use to access controllers, the Kin
ASHA 777 [7]

not be made for Xbox platform.

Hope this helps.

3 0
3 years ago
At the Data Link Layer of the OSI Model, what type of address is used to identify the receiving host?
Natalka [10]

Answer:

Mac Address

Explanation:

The MAC address or Media Access Control  is a unique identifier that each manufacturer assigns to their devices that can connect to the network.  They consist of 48 bits in hexadecimal form, grouped into 12 pairs of characters and each character is formed by four binary numbers, generally separated by a colon. MAC addresses are used in the data link layer of the OSI model, specifically in the lower Medium Access Control layer. An example of a MAC address could be:

10: 68: c5: 5e: 27: 3f.

6 0
3 years ago
Other questions:
  • Write a program for Horizon Phones, a provider of cellular phone service. Prompt a user for maximum monthly values for talk minu
    6·1 answer
  • Write a program that allows the user to convert a temperature given in degrees from either Celsius to Fahrenheit or Fahrenheit t
    13·1 answer
  • Consider what fact-finding techniques you would use to identify the important facts needed to develop a database system. Please
    7·1 answer
  • You are given a data set with information from 1,000 high school students (of which the following is a part of the data) and ask
    6·1 answer
  • Alpha Technologies, a newly established company, wants to share information about its work with people all over the world. Which
    9·1 answer
  • Describe an application where a parallel circuit might work better than a series circuit.
    15·1 answer
  • Extending the web server functionality implies that the web server and the web-to-database middleware will properly communicate
    10·1 answer
  • According to which virtue do you need to secure information by limiting computer access to authorized personnel only?
    6·1 answer
  • The chief intellectual property officer (CIPO) is responsible for collecting, maintaining, and distributing the organization's k
    14·1 answer
  • The chain of _____ documents that the evidence was under strict control at all times and no unauthorized person was given the op
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!