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
mart [117]
3 years ago
10

In a right triangle, the square of the length of one side is equal to the sum of the squares of the lengths of the other two sid

es. Write a program that prompts the user to enter the lengths of three sides of a triangle and then outputs a message indicating whether the triangle is a right triangle. If the triangle is a right triangle, output It is a right angled triangle If the triangle is not a right triangle, output It is not a right angled triangle.
Computers and Technology
1 answer:
Anna [14]3 years ago
3 0

Answer:

// here is program in C.

// include header

#include <stdio.h>

#include<math.h>

//main function

int main()

{

 // variables

 int x,y,z;

 int flag=0;

 // ask to enter the sides of triangle

 printf("enter the length of all sides of triangle:");

 // read the sides

 scanf("%d %d %d",&x,&y,&z);

 // check if square of any side is equal

 //to sum of square of other two sides

 if((x*x)==(y*y)+(z*z)||(y*y)==(x*x)+(z*z)||(z*z)==(y*y)+(x*x))

 flag=1;

 // if right angled triangle

 if(flag==1)

     printf("right angled triangle.\n");

// if not right angled triangle

 else

     printf(" not  a right angled triangle.\n");

   return 0;

}

Explanation:

Read the sides of the triangle and assign them to x,y,z respectively.Then check ((x*x)==(y*y)+(z*z)||(y*y)==(x*x)+(z*z)||(z*z)==(y*y)+(x*x)).If it true then set flag=1.After this if flag==1 then print triangle is right angled else not right angled.

Output:

enter the length of all sides of triangle:3 4 5

right angled triangle.

You might be interested in
People often delete or read email based upon the subject line alone select one:
erica [24]
The statement people often delete or read email based upon the subject line alone select one is TRUE. Based on the subject or topic of the email, they will judge if it is worthy to be read or deleted.
5 0
3 years ago
Read 2 more answers
Methods for preventing/overcoming group conflict include all EXCEPT:
kondor19780726 [428]

Answer:

recognizing that gender differences are a myth.

Explanation:

The options are:

  • active listening.
  • recognizing that gender differences are a myth.
  • structured debate.
  • building cross-cultural understanding

Without active listening, structured debate, and cross-cultural understanding group conflict are definitely on the card. However, no one now is concerned about gender differences. As now both the genders are already having the equal status in at least developed countries. However, this too can play a role in avoiding group conflict. However, since this is not that important considering the current context, this looks like being the correct option here. Hence, the above mentioned in the answer section is the correct option.

7 0
3 years ago
There are 2048bytes in4megabytes true or false​
ollegr [7]

Answer:

Explanation:

bonjour,

1 MB =  1 000 000 B (bytes)

4 MB = 4 000 000B

=> false

5 0
2 years ago
Given three variables, a, b, c, of type double that have already been declared and initialized, write a statement that prints ea
mihalych1998 [28]

Answer:

The statement is written in Java.

  1. System.out.printf("%.5f %.5f %.5f",a,b,c);

Explanation:

Presume that there are three variable a, b and c which have already been declared and initialized with 4.014268319, 14309, 0.00937608 respectively.

To print each of the value with 5 digits to the right of the decimal point, we can use printf() method. We create a format specifier %.5f which is a placeholder of a floating point value. The .5 will specify five digits to the right of the decimal point.

We just create three similar format specifiers ( one for variable a, b, and c, respectively) and include them into printf() method. This will print the output as follows:

4.01427 14309.00000 0.00938  

6 0
3 years ago
The process of a web server adding a tcp header to a web page, followed by adding an ip header, and then a data link header and
kumpel [21]
<span>Encapsulation is defined as the process of adding a header in front of data supplied by a higher layer (and possibly adding a trailer as well).</span>
7 0
3 years ago
Other questions:
  • Ben buys an Olympus E-PL2 from Sony which starts malfunctioning. When he opts for an exchange, the customer representative says
    11·1 answer
  • Write a statement that toggles the value of the bool variable onoffswitch. that is, if onoffswitch is false , its value is chang
    10·1 answer
  • Which ofthe following sentence beginnings would be best to use in apersuasive request?
    8·1 answer
  • ____ is the process of drawing a series of increasingly detailed DFDs, until all functional primitives are identified.
    7·1 answer
  • A customer seeks to buy a new computer for private use at home. The customer primarily needs the computer to use the Microsoft P
    9·1 answer
  • Write a program that asks a user to enter a date in month day year format (for example 10 12 2016) and displays the day of the w
    5·1 answer
  • Is an automatic computer check to ensure that the data entered is sensible and reasonable.It does not check the accuracy of data
    7·1 answer
  • This site isn't letting me add my ans and wut should I do?
    15·1 answer
  • Which type of evaluation requires that the program be fully implemented before the evaluation can begin
    9·1 answer
  • Jose would like to have text with predefined styles that can flow around an image in a variety of shapes and sizes
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!