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]
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. 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]3 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
_____ are used to control the flow of electricity in a circuit.
Travka [436]

Answer:

Switches control the flow of electricity in a circuit.

8 0
3 years ago
Read 2 more answers
(a) Calculate the heat flux through a sheet of steel that is 10 mm thick when the temperatures oneither side of the sheet are he
aleksandr82 [10.1K]

Answer:

do the wam wam

Explanation:

6 0
3 years ago
If a pilot-operated check valve (POC) does not check flow, you will see a. erratic actuator movement b, no actuator movement c.
Volgvan

If a pilot-operated check valve (POC) does not check flow, you will see a. erratic actuator movement.

<h3>What is a pilot-operated check valve (POC)?</h3>

Pilot operated test valves paintings through permitting loose float from the inlet port via the opening port. Supplying a pilot strain to the pilot port permits float withinside the contrary direction. Air strain on pinnacle of the poppet meeting opens the seal permitting air to float freely.

An actuator fault is a form of failure affecting the machine inputs. Due to strange operation or fabric aging, actuator faults might also additionally arise withinside the machine. An actuator may be represented through additive and/or multiplicative fault.

Read more about the pilot-operated check valve:

brainly.com/question/13001928

#SPJ1

7 0
2 years ago
LINKS GET BODIED ON SITE! RAWR
bulgar [2K]

Answer:

False

Explanation:

MRK ME BRAINLIEST PLZZZZZZZZZZZZZZZZZZ

7 0
3 years ago
Tubing cutters for copper tube are only available in one stlye true or false
Ratling [72]

Answer:

please how are you death for me account

3 0
3 years ago
Other questions:
  • Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 3, print "To
    7·1 answer
  • g A pump is required to deliver 100 gpm at a head of 100 ft, but the pump rated capacity is 150 gpm at a head of 100 ft. If the
    9·1 answer
  • A level loop began and closed on BM_A (elevation = 823.368 ft). The plus and minus sights were kept approximately equal. Reading
    11·1 answer
  • What friction rate should be used to size a duct for a static pressure drop of 0.1 in wc if the duct has a total equivalent leng
    9·1 answer
  • If noise levels are high enough that you have to raise
    7·1 answer
  • Which word from the passage best explains what the web in the passage symbolizes
    10·1 answer
  • Practice finding the volume of a sphere.
    10·2 answers
  • What is the difference between a series circuit and a parallel circuit?
    11·2 answers
  • For many clients, a decision is based primarily on time and money, which are the two most abundant
    10·2 answers
  • 1)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!