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
vredina [299]
3 years ago
10

Implement a program that requests four numbers (integer or floating-point) from the user. Your program should compute the averag

e of the first three numbers and compare the average to the fourth number. If they are equal, your program should print 'Equal' on the screen. >>>
Engineering
1 answer:
maks197457 [2]3 years ago
3 0

Answer:

#include<iostream>

int main() {

  float num_1, num_2, num_3, num_4, average;

  //Taking input for four numbers

  std::cout << "Enter first number(integer or floating-point)";

  std::cin >> num_1;

  std::cout << "Enter second number(integer or floating-point)";

  std::cin >> num_2;

  std::cout << "Enter third number(integer or floating-point)";

  std::cin >> num_3;

 

  std::cout << "Enter fourth number(integer or floating-point)";

  std::cin >> num_4;

  average= (num_1+num_2+num_3)/3;

 // Comparing average with fourth number

 if (average==num_4)

  {

  std::cout << "Equal";

 }

  return 0;

 }

You might be interested in
A gas tank is known to have a thickness of 0.5 inches and an internal pressure of 2.2 ksi. Assuming that the maximum allowable s
sergiy2304 [10]

Answer:

D_o=11.9inch

Explanation:

From the question we are told that:

Thickness T=0.5

Internal PressureP=2.2Ksi

Shear stress \sigma=12ksi

Elastic modulus \gamma= 35000

Generally the equation for shear stress is mathematically given by

 \sigma=\frac{P*r_1}{2*t}

Where

r_i=internal Radius

Therefore

 12=\frac{2.2*r_1}{2*0.5}

 r_i=5.45

Generally

 r_o=r_1+t

 r_o=5.45+0.5

 r_o=5.95

Generally the equation for outer diameter is mathematically given by

 D_o=2r_o

 D_o=11.9inch

Therefore

Assuming that the thin cylinder is subjected to integral Pressure

Outer Diameter is

 D_o=11.9inch

7 0
3 years ago
Find the resistance of a circuit that draws 4 amperes with 8 volts applied?
vodka [1.7K]

Answer:

2 ohms

Explanation:

V = I * R

8 = 4 * R

8 / 4 = R

R = 2 ohms

5 0
3 years ago
What is the primary reason traffic laws exist ?
kramer

so people dont die whaddya think?

4 0
3 years ago
Read 2 more answers
The pilot of an airplane reads the altitude 6400 m and the absolute pressure 45 kPa when flying over the city. Calculate the loc
garri49 [273]

Answer:

1) The absolute pressure equals = 96.98 kPa

2) Absolute pressure in terms of column of mercury equals 727 mmHg.

Explanation:

using the equation of pressure statics we have

P(h)=P_{surface}-\rho gh...............(i)

Now since it is given that at 6400 meters pressure equals 45 kPa absolute hence from equation 'i' we obtain

P_{surface}=P(h)+\rho gh

Applying values we get

P_{surface}=45\times 10^{3}+0.828\times 9.81\times 6400

P_{surface}=96.98\times 10^{3}Pa=96.98kPa

Now the pressure in terms of head of mercury is given by

h_{Hg}=\frac{P}{\rho _{Hg}\times g}

Applying values we get

h=\frac{96.98\times 10^{3}}{13600\times 9.81}=0.727m=727mmHg

7 0
3 years ago
A plane wall of length L, constant thermal conductivity k and no thermal energy generation undergoes one-dimensional, steady-sta
KIM [24]

Answer:

Temperature distribution is T(x)=\dfrac{q}{k}(L-x)+T

Heat flux=q

Heat rate=q A  

Explanation:

We know that for no heat generation and at steady state

\dfrac{\partial^2 T}{\partial x^2}=0

\dfrac{\partial T}{\partial x}=a

T(x)=ax+b

a and are the constant.

Given that heat flux=q

We know that heat flux given as

q=-K\dfrac{dT}{dx}

From above we can say that

a= -\dfrac{q}{K}

Alos given that when x= L temperature is T(L)=T

T= -\dfrac{q}{K}L+b

b=T+\dfrac{q}{K}L

So temperature T(x)

T(x)=-\dfrac{q}{K}x+T+\dfrac{q}{K}L

T(x)=\dfrac{q}{k}(L-x)+T

So temperature distribution is T(x)=\dfrac{q}{k}(L-x)+T

Heat flux=q

Heat rate=q A         (where A is the cross sectional area of wall)

   

6 0
3 years ago
Other questions:
  • The structure supports a distributed load of w. The limiting stress in rod (1) is 370 MPa, and the limiting stress in each pin i
    5·1 answer
  • A gear motor can develop 2 hp when it turns at 450rpm. If the motor turns a solid shaft with a diameter of 1 in., determine the
    7·1 answer
  • A rigid 10-L vessel initially contains a mixture of liquid and vapor water at 100 °C, with a quality factor of 0.123. The mixtur
    11·1 answer
  • Short-term memoryA) has a larger storage capacity than long-term memory.B) takes longer to retrieve than long-term memory.C) inv
    9·1 answer
  • The working section of a transonic wind tunnel has a cross-sectional area 0.5 m2. Upstream, where the cross-section area is 2 m2
    10·1 answer
  • A force that attempts to decrease the length of a structural member is____
    14·1 answer
  • Given numRows and numColumns, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print
    10·1 answer
  • How many steps are there in the problem-solving process?
    9·2 answers
  • A cyclic tensile load ranging from 0 kN to 55 kN force is applied along the length of a 100 mm long bar with a 15 mm x 15 mm squ
    14·1 answer
  • Problem definition
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!