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 soil sample has a moist unit weight of 117 pcf, a moisture content of 17 percent, and soil particles with a specific gravity o
nikklg [1K]

Answer:

(A) Dry unit weight. = 15.71 kN/m³ =100.91 pcf

(B) Porosity = 40.82 %

(C) Degree of saturation = 66.52 %

(D) Weight of water, in pounds per cubic foot, to be added to reach full saturation = 81.22 pcf

Explanation:

(A) γd =\frac{\gamma }{1+w} = \frac{18.379}{1+.17} = 15.71 KN/m³

(B) \gamma _d =\frac{G_{s}* \gamma _w }{1+e} therefore  1+e = \frac{G_{s}* \gamma _w }{\gamma _d } \frac{2.7*9.81}{15.71} = 1.69

Therefore e = 0.69 and

Porososity n = \frac{e}{1+e} =\frac{0.69}{1+0.69} × 100% = 40.82 %

(C)  S_{e}  = w*G_{s} therefore S =\frac{w*G_{s}}{e} = \frac{0.17*9.81}{0.69}×100 = 66.52 %

(D) \gamma _{sat} =\frac{(G_{s}+e) \gamma_{w}  }{1+e} = \frac{(2.7+0.69)9.81}{1+0.69} = 19.68 kN/m³

The required amount of water is found from γ =ρ×g

ρ mass of water = \frac{\gamma}{g}  = \frac{(19.68-18.38)\frac{kN}{m^{3} } }{9.81 kg\frac{m}{s^{2} } } *\frac{1000 N}{kN} *\frac{9.81 kg\frac{m}{s^{2} } }{N} = 1301 \frac{kg}{m^{3} }

1 kg/m³ = 0.062 pcf therefore 1301 kg/m³ = 1301 ×0.062 pcf or 81.22 pcf

6 0
3 years ago
What is the difference between a cost and a benefit?
goblinko [34]

Answer:

A cost is something you have to give up or sacrifice and a benefit is something that is gained or is helpful.

Explanation:

In a cost-benefit analysis of a system, an engineer is to simply look at the requirements for the system and determine the costs to build the system, both in financial value and energy value.  Additionally, the engineer needs to determine the benefits that would come from choosing a particular path of cost.  If the benefits outweigh the cost for the project, then the solution is accepted.  Else, the cost outweighs the benefit and the solution is rejected.

6 0
3 years ago
A window‐mounted air‐conditioning unit (AC) removes energy by heat transfer from a room, and rejects energy by heat transfer to
Arada [10]

Solution :

Given :

The power of the air‐conditioning (AC) unit is , W = 0.434 kW

The coefficient of performance or the COP of the air‐conditioning (AC) unit is given by  = 6.22

Therefore he heat removed is given by , $Q_H = 6.22 \times 0.434$

                                                                     $Q_H = 2.7 \ kW $

Now if the electricity is valued at  0.10 dollar per kW hour, then the operating cost of the air conditioning unit in 24 hours is given by = 0.10 x 2.7 x 24

                                                                                            = 6.48

Therefore the operating cost = $ 6.48 for 24 hours.

3 0
3 years ago
Determine the length of the cantilevered beam so that the maximum bending stress in the beam is equivalent to the maximum shear
Rus_ich [418]
The shear stress at any given point y1 along the height of the cross section is calculated by: where Ic = b·h3/12 is the centroidal moment of inertia of the cross section. The maximum shear stress occurs at the neutral axis of the beam and is calculated by: where A = b·h is the area of the cross section.
3 0
4 years ago
Suppose that you are working in a home that has a 15kw oven that operates on 240 V, The oven is on a branch circuit by itself. W
krok68 [10]

Explanation:

please see it my work solution

7 0
3 years ago
Other questions:
  • Explain the purpose of the checkpoint mechanism. How often should checkpoints be performed?How does the frequency of checkpoints
    6·1 answer
  • What will occur when the trough of Wave A overlaps the trough of Wave B?
    8·2 answers
  • 2. Compare an object
    9·1 answer
  • Assume that light of wavelength 6000A is coming from a star. What is the limit of resolution of a telescope whose objective has
    7·1 answer
  • If you are interested only in the temperature range of 20° to 40°C and the ADC has a 0 to 3V input range, design a signal condit
    10·1 answer
  • Which among the four that doesn't use an elbow in wiring installation a.EMT b. CPC c.PVC d.RSC<br>​
    8·1 answer
  • Why we use combination of grep with awk, explain with example?
    12·1 answer
  • In approximately 200 words, explain what three factors you believe will have the greatest impact on the future of the green buil
    11·1 answer
  • One half of 17’ 9 3/16”
    13·1 answer
  • Congress can pass laws concerning ___. (Select all that apply.)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!