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
Eddi Din [679]
2 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. Assume the user does not know the hypotenuse. You may NOT ask the user for the hypotenuse. Meaning, you have to check all 3 sides to verify that it is a right-angled triangle.
Engineering
1 answer:
Dovator [93]2 years ago
8 0

Answer:

C++ code is explained below

Explanation:

/Remove the following line

//if not using visual studio.

#include "stdafx.h"

//Import the required header files.

#include <iostream>

using namespace std;

//Define the main function.

int main(void)

{

    //Define the variables.

    double side1, side2, side3;

    //Prompt the user to enter the sides of the triangle.

    cout << "Enter the side of the triangle:" << endl;

    cout << "Enter first side of triangle:" << endl;

    cin >> side1;

    cout << "Enter second side of triangle:" << endl;

    cin >> side2;

    cout << "Enter third side of triangle:" << endl;

    cin >> side3;

    cout << endl;

    //Check if the triangle sides are valid

    if ((side1 + side2 > side3) &&

         (side1 + side3 > side2) &&

         (side2 + side3 > side1))

    {

         //Check the condition for right angle triangle

         if ((side3*side3 == (side1*side1 + side2*side2)) ||

             (side2*side2 == (side3*side3 + side1*side1)) ||

             (side1*side1 == (side3*side3 + side2*side2)))

//Display that the triangle is right-angled triangle.

             cout << "It is a right-angled triangle." << endl;

         else

//Display that the triangle is not the right-//angled triangle.

             cout << "It is not a right-angled triangle."

<< endl;

    }

    else

         //Display not the valid side.

         cout << "Not a valid side." << endl;

    //Remove the following line if

    //not using visual studio.

    system("pause");

    return 0;

}

You might be interested in
There are two questions about SolidWorks.
Nataliya [291]

Answer:

1. It is a good practice to fully define a sketch to avoid having erroneous dimensions on the faces of a solid, this avoids that when it is required to make an assembly with the drawn part appear assembly errors.

2. The 2D sketch should always be done on a plane, so solidworks would ask you to select a plane on which you want to make the sketch, on the other hand, if it is a 3D sketch, solidworks allows you to do it without the need for Select any plane.

4 0
3 years ago
The A/C compressor will not engage when the A/C is turned on. The static refrigerant pressure is 75 psi and the outside temperat
VikaD [51]

In the case above,  poor connection at the pressure cycling switch  and also a faulty A/C clutch coil could be the cause.

<h3>What is likely the reason when an A/C compressor will not engage if A/C is turned on?</h3>

The cause that hinders the A/C Compressor from engaging are:

  • Due to low pressure lockout.
  • Due to a poor ground
  • Due to bad clutch coil.
  • Dur to an opening in the wire that links to the clutch coil.
  • Due to a blown fuse.

Note that the pressure switches is known to be one that control the on/off function of any kind of AC compressor and as such, if there is switch failure, it can hinder the AC compressor from functioning at all.

Therefore, technician A and B are correct.

Learn more about refrigerant pressure from

brainly.com/question/10054719

#SPJ1

3 0
2 years ago
Earth whose in situ weight is 105lb/cf and whose compacted weight is 122 lb/cf is placed in a fill at the rate of 260 cy/hr, mea
Stells [14]

Answer:

Number of rollers required to complete the compaction are 2

Explanation:

The solution is given in the attachments.

6 0
3 years ago
As you get older your muscles grow. True or False
xenn [34]

Answer:

True

Explanation:

This is a true fact because From the time you are born to around the time you turn 30, your muscles grow larger and stronger.

8 0
2 years ago
Read 2 more answers
If a front gear had 24 teeth, and a rear gear has 12 teeth:
zubka84 [21]

Answer:

  4 times around

Explanation:

The total number of teeth involved will be the same for each gear. If the front gear is connected to the pedal and it goes around twice, then 2·24 = 48 teeth will have passed the reference point.

If the rear gear is attached to the wheel, and 48 teeth pass the reference point, then it will have made ...

  (48 teeth)/(12 teeth/turn) = 4 turns

4 0
2 years ago
Other questions:
  • 11 Notează, în caiet, trăsăturile personajelor ce se pot
    13·1 answer
  • Which statement is true for the relay logic diagram shown below?
    9·1 answer
  • Two cars A and B leave an intersection at the same time. Car A travels west at an average speed of x miles per hour and car B tr
    9·1 answer
  • Please explain the theory of Hydrostatic Thrust on a plane Surface
    14·2 answers
  • A horse on the merry-go-round moves according to the equations r = 8 ft, u = (0.6t) rad, and z = (1.5 sin u) ft, where t is in s
    5·1 answer
  • List fabrication methods of composite Materials.
    12·1 answer
  • (a) Design a first-order passive high-pass filter with a cutoff frequency of 1000 rad/sec.
    8·1 answer
  • A minor road intersects a major 4-lane divided road with a design speed of 50 mph and a median width of 12 ft. The intersection
    13·1 answer
  • Ppman2000 Aye Get On Treasure Quest and Join Masons Kingdom :D
    10·1 answer
  • What is the difference between POP3 and IMAP?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!