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
You are troubleshooting a computer that is in the design phase. The problem you see is that the CPU is not receiving information
iogann1982 [59]

Answer:

Control bus

Explanation:

A control bus is a PC bus that is utilized by the CPU to speak with gadgets that are contained inside the PC. This happens through physical associations, for example, links or printed circuits.

The CPU transmits an assortment of control sign to parts and gadgets to transmit control sign to the CPU utilizing the control bus. One of the principle targets of a transport is to limit the lines that are required for communication

An individual bus licenses communication between gadgets utilizing one information channel. The control transport is bidirectional and helps the CPU in synchronizing control sign to inside gadgets and outer segments. It is included interfere with lines, byte empower lines, read/compose sign and status lines.

8 0
3 years ago
The BaseballPlayer class stores the number of hits and the number of at-bats a player has. You will complete this class by writi
Rzqust [24]

Answer:

Answered below

Explanation:

Class BaseballPlayer{

//Instance variables

string name;

int hits;

int bats;

//Constructor

BaseballPlayer (string a, int b, int c){

name = a;

hits = b;

bats = c

}

public void printBattingDetails( ){

System.out.print(name, hits, bats)

}

}

//Demo class

Class BaseballTester{

public static void main (String args []){

BaseballPlayer player = new BaseballPlayer("Joe", 8, 4)

player.printBattingDetails( )

}

}

8 0
2 years ago
Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail relationship with the
Rudik [331]

Answer:

The account record comprises of Invoice roll up summary fields.

Explanation:

The possible reason that this change was not permitted was that the account record comprises of Invoice roll up summary fields.

Invoice roll up summary fields: A roll-up summary field computes values from associated records, for example those in a linked list. a person or someone ca design a roll-up summary field to show a value in a master record by building  the values of fields in a particular record.

The detail record must be associated to the master through a master-detail relationship. for instance, you want to show the sum of invoice amounts for all linked custom object records in an account’s Invoices related list. you can show the whole or sum in a custom account field refereed to as Total Invoice Amount.

4 0
3 years ago
(true or false) fortnite is the best?
GarryVolchara [31]

Answer:

FALSE ZzZzZzZz

Explanation:

Cus it is PERIOT

7 0
2 years ago
Read 2 more answers
What bug was supposed to start affecting computers on january 1 2000
horsena [70]

Answer: Y2K bug, also called Year 2000 bug or Millennium Bug

5 0
3 years ago
Other questions:
  • Deterime the minimum number of multiplication operations needed to compute the following. Show the order of the computations.
    10·1 answer
  • Assume that scotus is a two-dimensional character array that stores the family names (last names ) of the nine justices on the S
    6·1 answer
  • Yahoo and Google are examples of __________ used to perform Internet research.
    14·2 answers
  • For which of the following is a bulleted list more appropriate than a numbered list?
    6·1 answer
  • There are many modes of remote visual communication. which is the most common mode
    5·1 answer
  • Reply emailing a student who is asking about audio materials​
    6·2 answers
  • Which type of infrastructure service stores and manages corporate data and provides capabilities for analyzing the data
    12·1 answer
  • Choices.
    11·1 answer
  • Which of these is not enumerated as a motivation to create accessible web content?
    10·1 answer
  • What would be an ideal scenario for using edge computing solutions?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!