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
What should you do if ads keep popping up on your computer when using Google Chrome?
romanna [79]
I think it’s B.. I’m pretty sure
8 0
3 years ago
The range of an area where users can access the Internet via high frequency radio signals transmitting an Internet signal from a
Alexandra [31]
A) hotspot
Bluetooth is for short distance and pan is Personal area networks (PANs) connect an individual's personal devices
8 0
3 years ago
Read 2 more answers
What is mean by sole trading concern?​
DENIUS [597]

Answer:

trading as a whole

Explanation:

pls give brainlest almost lvled up.

6 0
3 years ago
Which network device regenerates the data signal without segmenting the network? modem?
Yanka [14]
Hub(s) is the answer
6 0
3 years ago
On Election Day, TV news network Houston News One is trying to project the 2018 Texas election results. They send pollsters to 4
Leni [432]

Answer:

entrance poll

Explanation:

Based on the information provided within the question it seems that the type of poll that the news network is conducting is an entrance poll. This refers to asking question (poll) to people outside of the voting center before they enter to place their vote as opposed to exit poll which is done after the individual has placed their vote.

8 0
2 years ago
Other questions:
  • How do u change the level of education on Brainly. cuz i just finished elementry
    9·2 answers
  • You just read an msds for acetic acid. based on what you read, what type of information is included in an msds sheet? record you
    7·1 answer
  • A paradigm innovation occurs when:
    6·1 answer
  • An intranet is an external network.TrueFalse
    15·1 answer
  • _____ is a school-to-work program that provides the student with paid employment, school credit, and grades while participating.
    14·2 answers
  • Write a Java program that prompts the user to enter a sequence of non-negative numbers (0 or more), storing them in an ArrayList
    5·1 answer
  • Select the correct answer. What has enabled engineers to design slim and sleek television sets? A. using Nipkow disks B. increas
    7·1 answer
  • According to the text, the three IT trends that are having the greatest impact on the IT environment are:
    11·1 answer
  • The part of the computer that provides access to the internet is the
    7·1 answer
  • Discuss the concept of the “state of a process”. Give examples to illustrateyour answers?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!