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
HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
trasher [3.6K]

Answer:

The publication of a parody for commercial gain does not fall within the protection afforded by Section 107, as it is used for commercial gain.

Explanation:

<h2><u><em>PLEASE MARK AS BRAINLIEST!!!!!</em></u></h2>
4 0
2 years ago
1. Consider a city of 10 square kilometers. A macro cellular system design divides the city up into square cells of 1 square kil
kakasveta [241]

Answer:

a) n = 1000\,users, b)\Delta t_{min} = \frac{1}{30}\,h, \Delta t_{max} = \frac{\sqrt{2} }{30}\,h, \Delta t_{mean} = \frac{1 + \sqrt{2} }{60}\,h, c) n = 10000000\,users, \Delta t_{min} = \frac{1}{3000}\,h, \Delta t_{max} = \frac{\sqrt{2} }{3000}\,h, \Delta t_{mean} = \frac{1 + \sqrt{2} }{6000}\,h

Explanation:

a) The total number of users that can be accomodated in the system is:

n = \frac{10\,km^{2}}{1\,\frac{km^{2}}{cell} }\cdot (100\,\frac{users}{cell} )

n = 1000\,users

b) The length of the side of each cell is:

l = \sqrt{1\,km^{2}}

l = 1\,km

Minimum time for traversing a cell is:

\Delta t_{min} = \frac{l}{v}

\Delta t_{min} = \frac{1\,km}{30\,\frac{km}{h} }

\Delta t_{min} = \frac{1}{30}\,h

The maximum time for traversing a cell is:

\Delta t_{max} = \frac{\sqrt{2}\cdot l }{v}

\Delta t_{max} = \frac{\sqrt{2} }{30}\,h

The approximate time is giving by the average of minimum and maximum times:

\Delta t_{mean} = \frac{1+\sqrt{2} }{2}\cdot\frac{l}{v}

\Delta t_{mean} = \frac{1 + \sqrt{2} }{60}\,h

c) The total number of users that can be accomodated in the system is:

n = \frac{10\times 10^{6}\,m^{2}}{100\,m^{2}}\cdot (100\,\frac{users}{cell} )

n = 10000000\,users

The length of each side of the cell is:

l = \sqrt{100\,m^{2}}

l = 10\,m

Minimum time for traversing a cell is:

\Delta t_{min} = \frac{l}{v}

\Delta t_{min} = \frac{0.01\,km}{30\,\frac{km}{h} }

\Delta t_{min} = \frac{1}{3000}\,h

The maximum time for traversing a cell is:

\Delta t_{max} = \frac{\sqrt{2}\cdot l }{v}

\Delta t_{max} = \frac{\sqrt{2} }{3000}\,h

The approximate time is giving by the average of minimum and maximum times:

\Delta t_{mean} = \frac{1+\sqrt{2} }{2}\cdot\frac{l}{v}

\Delta t_{mean} = \frac{1 + \sqrt{2} }{6000}\,h

8 0
3 years ago
Calculate the osmotic pressure of seawater containing 3.5 wt % NaCl at 25 °C . If reverse osmosis is applied to treat seawater,
AlladinOne [14]

Answer:

Highest osmotic pressure that membrane may experience is

' =58.638 atm

Explanation:

Suppose sea-water taken is M= 1 kg

Density of water = 1000 kg/m3

Therefore Volume of water= Mass,M/Density of water

V= 1 kg/(1000 kg/m3)

V= 10-3 m3= 1 Litre

Since mass of Nacl is 3.5 wt%,Therefore in 1 kg of water

Mass present of NaCl= m= 0.035*1000 g

m= 35 g

Since molecular weight of NaCl= 58.44 g/mol =M.W.

Thus its Number of moles of Nacl= m/M.W

nNaCl= 35g/58.44 gmol-1

= 0.5989 mol

ans since volume of solution is 1 L thus concentration of NaCl is ,C= number of moles/Volume of solution in Litres

C= 0.5989mol/ 1L

=0.5989 M

Since 1 mol NaCL disssociates to form 2 moles of ions of Na+ andCl- Thus van't hoff factor i=2

And osmotic pressure  = iCRT ------------------------------(1)( Where R= 0.0821 L.atm/mol.K and T= 25oC= 298.15 K)

Putting in equation 1 ,we get  = 2*(0.5989 mol/L)*(0.0821 L.atm/mol.K)*298.15 K

=29.319 atm

Now as the water gets filtered out of the membrane,the water's volume decreases and concentration C of NacL increases, thus osmotic pressure also increases.Thus, at 50% water been already filtered out, the osmotic pressure at the membrane will be maximum

Thus Volume of water left after 50% is filtered out as fresh water= 0.5 L (assuming no salt passes through semi permeable membrane)

Thus New concentration of NaCl C'= 2*C

C'=2*0.5989 M

=1.1978 M

and Since Osmotic pressure is directly proportional to concentration, Thus As concentration C doubles to C', Osmotic Pressure  ' also doubles from  ,

Thus,Highest osmotic pressure that membrane may experience is,  '=2*  

=2*29.319 atm

' =58.638 atm

3 0
3 years ago
How will the delay and active power per device change as you increase the doping density of both the N- and the P-MOSFET?
Murljashka [212]

Answer:

hello your question is incomplete attached below is the missing part of the  question

Consider an inverter operating a power supply voltage VDD. Assume that matched condition for this inverter. Make the necessary assumptions to get to an answer for the following questions.

answer : Nd ∝ rt

Explanation:

Determine how the delay and active power per device will change as the doping density of N- and P-MOSFET increases

Pactive ( active power ) = Efs * F

Pactive = \frac{q^2Nd^2*Xn^2}{6Eo} * f

also note that ; Pactive ∝ Nd2 (

tD = K . \frac{Vdd}{(Vdd - Vt )^2}  since K = constant

Hence : Nd ∝ rt

5 0
3 years ago
If angle A is a complement of angle B, angle B and angle C are vertical angles, and the supplement of C has a measure of 140°. F
Over [174]

Answer:

50°

Explanation:

Complementary angles add up to 90°.

Supplementary angles add up to 180°.

Vertical angles are equal.

A + B = 90°

B = C

C = 180° − 140°

C = 40°

B = 40°

A = 50°

7 0
3 years ago
Other questions:
  • If the contact surface between the 20-kg block and the ground is smooth, determine the power of force F when t = 4 s. Initially,
    14·1 answer
  • True or false? Don't break or crush mercury-containing lamps because mercury powder may be released.
    8·1 answer
  • Which process is a from of mechanical weathering
    8·1 answer
  • or a metal pipe used to pump tomato paste, the overall heat- transfer coefficient based on internal area is 2 W/(m2 K). The insi
    14·1 answer
  • All of the following are categories for clutch covers except
    11·1 answer
  • Georgia Tech is committed to creating solutions to some of the world’s most pressing challenges. Tell us how you have improved o
    15·1 answer
  • Puan puan puan vericim
    5·2 answers
  • Can some one plz give me brainlys
    14·2 answers
  • I will give Brainliest, please help. :)
    11·2 answers
  • Whats viruses c liver?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!