Math, asked by pragyanmurmu2501, 11 months ago

Write a program that accepts the lengths of three sides of a triangle as inputs. The program output should indicate whether or not the triangle is a right triangle (recall from the pythagorean theorem that in a right triangle, the square of one side equals the sum of the squares of the other two sides).

Answers

Answered by amitnrw
0

First Check Which side is Largest Then Check if Square of Largest side is equal to sum of square of other two sides or not

Step-by-step explanation:

I am giving algorithm

Start

Input side if triangle

as A , B  ,C

if  ( A > B)

{   if ( A > C)

      {  if ( A² = B² + C²)

       {   print :Triangle is right angle triangle}

        Else   {   print :Triangle is not right angle tringle}

  Elseif ( C² = B² + A²)

       {   print :Triangle is right angle triangle}

        Else   {   print :Triangle is not right angle triangle}

      }

Elseif  ( B > C )

   if ( B² = C² + A²)

       {   print :Triangle is right angle triangle}

        Else   {   print :Triangle is not right angle triangle}

  Elseif ( C² = B² + A²)

       {   print :Triangle is right angle triangle}

        Else   {   print :Triangle is not right angle triangle}

}

End

Learn More:

Write an algorithm and program for multiplication of a lower ...

https://brainly.in/question/6433960

What are the steps to algorithm a program - Brainly.in

https://brainly.in/question/3129047

Similar questions