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
Nơi nào có điện tích thì xung quanh điện tích đó có :
maksim [4K]

Explanation:

sory sorry sorry sorrysorrysorry

4 0
2 years ago
Before finishing and installing a shelved cabinet you just constructed, you need to check the
Greeley [361]

Answer:

Carpenter's square

Explanation:

The most common hand tool used to measure or set angles with its application extending to setting angles of roofs and rafters. Another name of a Carpenter's square is a framing square.

Other hand tools that are used to measure angles are;

  • The combination square that allows a user to set both 90°  and 45° angles
  • A Bevel that allows users to set any angle they like.
  • A Protractor that resembles a bevel but its marks are marked in an arc.
  • An electromagnetic angle finder which gives a reading according to the measure of the arms adjusted by the user.
7 0
3 years ago
Question 1 A design team completes their high-fidelity prototype of a responsive website. Before they hand off designs to the en
MissTica

A question the design team should answer before handing off the designs is: are the designs a true representation of the intended end user experience?

<h3>What is a website?</h3>

A website can be defined as a collective name that is used to describe series of webpages that are interconnected or linked together with the same domain name.

In Computer technology, the main goal of a high-fidelity prototype is to understand how end users would interact with a website and areas to improve the design.

In conclusion, the design team should answer whether or not the designs are a true representation of the intended end user experience before handing off the designs.

Read more on website here: brainly.com/question/26324021

5 0
2 years ago
A solid circular rod that is 600 mm long and 20 mm in diameter is subjected to an axial force of P = 50 kN The elongation of the
Kay [80]

Answer:

a) V = 0.354

b)  G = 25.34 GPA

Explanation:

Solution:

We first determine Modulus of Elasticity and Modulus of rigidity

Elongation of rod ΔL = 1.4 mm

Normal stress, δ = P/A

Where P = Force acting on the cross-section

A = Area of the cross-section

Using Area, A = π/4 · d²

= π/4 · (0.0020)²  = 3.14 × 10⁻⁴m²

δ = 50/3.14 × 10⁻⁴    = 159.155 MPA

E(long) = Δl/l  = 1.4/600 = 2.33 × 10⁻³mm/mm

Modulus of Elasticity Е = δ/ε

= 159.155 × 10⁶/2.33 × 10⁻³    = 68.306 GPA

Also final diameter d(f) = 19.9837 mm

Initial diameter d(i) = 20 mm

Poisson said that V = Е(elasticity)/Е(long)

= -  <u>( 19.9837 - 20 /20)</u>

        2.33 × 10⁻³                  

= 0.354,

∴ v = 0.354

Also G = Е/2. (1+V)

=  68.306 × 10⁹/ 2.(1+ 0.354)

= 25.34 GPA

⇒ G = 25.34 GPA

5 0
3 years ago
The period of an 800 hertz sine wave is
sukhopar [10]

Explanation:

White Board Activity: Practice: A sound has a frequency of 800 Hz. What is the period of the wave? The wave repeats 800 times in 1 second and the period of the function is 1/800 or 0.00125.

3 0
2 years ago
Other questions:
  • The first step to merging is entering the ramp and _____.
    10·1 answer
  • Using any of the bilinear transform, matched pole-zero, or impulse invariance techniques in converting a continuous-time system
    14·2 answers
  • Students are expected to respond to one of the two questions described below. Students should provide examples to clarify their
    12·1 answer
  • Imagine you work for the public housing agency of a city, and you have been charged with keeping track of who is living in the a
    15·1 answer
  • The outer surface of a spacecraft in space has an emissivity of 0.6 and an absorptivity of 0.2 for solar radiation. If solar rad
    12·1 answer
  • An inventor tries to sell you his new heat engine that takes in 40 J of heat at 87°C on each cycle, expels 30 J at 27°C, and doe
    14·1 answer
  • A saturated 1.5 ft3 clay sample has a natural water content of 25%, shrinkage limit (SL) of 12% and a specific gravity (GS) of 2
    11·1 answer
  • 1. Which of the following is the ideal way to apply pressure onto pedals?
    14·2 answers
  • Which source would be the best to base a hypothesis upon
    9·1 answer
  • What is the tolerance of number 4?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!