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
Beth would like to run an nmap scan against all of the systems on her organization's private network. These include systems in t
Natasha_Volkova [10]

Answer:

<em>B. 10.0.0.0/8. </em>

Explanation:

Using an 8-bit subnet mask ensures the <em>network address is represented by the first octet of the IP address and is very efficient.</em>

The suffix /8 implies that Beth checks all devices in the 10.0.0.0 network (hosts between 10.0.0.0 and 10.255.255.255).

8 0
3 years ago
which of these paste options is commonly available from the paste options button? A&gt; use the destination them. B. keep the em
Anuta_ua [19.1K]
The correct option is D, PASTE AS CONTENT ONLY.
The paste option is the one which allows one to copy the content in a particular page and put it another space or page. The paste command has many options depending on the software that one is using, whether it is word, excel or power point. These options allow one to customize the copied and pasted content. One of the options that are usually available under paste option is paste as content only.
6 0
3 years ago
Read 2 more answers
A section-lined area is always completely bounded or outlined by an?
Paraphin [41]
Visible outline.
hope this helps
8 0
3 years ago
In which format is information stored on a hard drive?
Natalija [7]
The answer is binary
6 0
3 years ago
Find what the secret message is. Get Brainliest if you are fast and correct.
Firdavs [7]

Answer:

What does your digital footprint say about you?

Explanation:

Just follow the path from the end to the start, that's how I always get mazes.

8 0
2 years ago
Read 2 more answers
Other questions:
  • How can you best protect yourself when using social media
    5·2 answers
  • Given a scanner reference variable named input that has been associated with an input source consisting of a sequence of integer
    14·2 answers
  • 1. What are the built-in operations on classes?
    8·1 answer
  • Drag the correct type of update to its definition.
    14·1 answer
  • The introduction of new information technology has a: A. dampening effect on the discourse of business ethics. B. waterfall effe
    14·1 answer
  • A customer has contacted you to help him alleviate a large amount of time and effort that goes into adding and removing users wh
    14·1 answer
  • All mla text is double spaced. true false
    13·2 answers
  • URGENT!!! Which file format is used mainly in the Microsoft Windows operating system?
    15·2 answers
  • Gray London is a retired race car driver who helped Dale Earnhardt, Jr. get his start. He is writing a book and making a video a
    9·1 answer
  • We have studied machine cycle in class. Suppose that each of the four modules of machine cycle is taking 2 seconds. If there are
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!