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
Arlecino [84]
3 years ago
6

Write analgorithm and a C code to calculate the sum and average value of an array12elements.For example: Array_Temperaure=[10, 1

2, 13, 15, 20, 23, 25, 25, 25, 16, 13, 10}

Engineering
1 answer:
Lerok [7]3 years ago
4 0

Answer:

The solution of this code is given below in explanation section.

Explanation:

The C code of this problem is given below

/*******************************************************************************/

#include <stdio.h>

int main()

{

   int n=12, i;//n show the elements in array, while i will be used in for loop

   float Array_Temperaure[]={10, 12, 13, 15, 20, 23, 25, 25, 25, 16, 13, 10};//Array_Temperaure declared and initialized  

   float sum = 0.0;// sum variable declared and initialized

   float avg;// avg average variable declared and initialized

   

   for (i = 0; i < 12; ++i) //for loop to iterate through elements in Array_Temperaure.

   {  

       

       sum += Array_Temperaure[i];// in sum vaiable, Array_Temperaure numbers are added

   }

   avg = sum / n;// average is calculated

   printf("Sum = %.2f", sum);// sum is shown

   printf("\nAverage = %.2f", avg);// average is desplayed.

   return 0;

}

/*************************************************************** algorithm******************/

declare array Array_Temperaure[12];

declare int variable n ,i;

declare float variable sum and average;

for loop

          To iterate n time

                    sum the number of array at current index into total sum

calculate average;

display sum;

display average;

terminate the program;

You might be interested in
What are the reasons why fine grained of alkali igneous rocks can not be used in cement
Luden [163]

Fine grained of alkali igneous rocks cannot be used in cement because of the volume expansion caused by the Alkali-silica reaction, fine-grained igneous rocks cannot be used as aggregates in cement.

<h3>What does fine grained mean in an igneous rock?</h3>

Extrusive igneous rocks have a fine-grained or aphanitic texture, with grains that are too small to see without a magnifying glass. The fine-grained texture suggests that the rapidly cooling lava did not have enough time to form large crystals. A petrographic microscope can be used to examine these tiny crystals.

The texture of an igneous rock (fine-grained vs coarse-grained) is determined by the rate at which the melt cools: slow cooling produces large crystals, while fast cooling produces small crystals.

The chemical reaction that occurs in both alkali cations and hydroxyl ions in the pore solution of hydrated cement paste and certain reactive silica phases present in concrete aggregates is known as the alkali-silica reaction (ASR).

Learn more about cement on:

brainly.com/question/14323034

#SPJ1

8 0
2 years ago
A pump with a power of 5 kW (pump power, and not useful pump power) and an efficiency of 72 percent is used to pump water from a
almond37 [142]

Answer:

a) The mass flow rate of water is 14.683 kilograms per second.

b) The pressure difference across the pump is 245.175 kilopascals.

Explanation:

a) Let suppose that pump works at steady state. The mass flow rate of the water (\dot m), in kilograms per second, is determined by following formula:

\dot m = \frac{\eta \cdot \dot W}{g\cdot H} (1)

Where:

\dot W - Pump power, in watts.

\eta - Efficiency, no unit.

g - Gravitational acceleration, in meters per square second.

H - Hydrostatic column, in meters.

If we know that \eta = 0.72, \dot W = 5000\,W, g = 9.807\,\frac{m}{s^{2}} and H = 25\,m, then the mass flow rate of water is:

\dot m = 14.683\,\frac{kg}{s}

The mass flow rate of water is 14.683 kilograms per second.

b) The pressure difference across the pump (\Delta P), in pascals, is determined by this equation:

\Delta P = \rho\cdot g\cdot H (2)

Where \rho is the density of water, in kilograms per cubic meter.

If we know that \rho = 1000\,\frac{kg}{m^{3}}, g = 9.807\,\frac{m}{s^{2}} and H = 25\,m, then the pressure difference is:

\Delta P = 245175\,Pa

The pressure difference across the pump is 245.175 kilopascals.

4 0
3 years ago
Atmospheric air at 25 °C and 8 m/s flows over both surfaces of an isothermal (179C) flat plate that is 2.75m long. Determine the
vekshin1

Answer:

Re=100,000⇒Q=275.25 \frac{W}{m^2}

Re=500,000⇒Q=1,757.77\frac{W}{m^2}

Re=1,000,000⇒Q=3060.36 \frac{W}{m^2}

Explanation:

Given:

For air      T_∞=25°C  ,V=8 m/s

  For surface T_s=179°C

     L=2.75 m    ,b=3 m

We know that for flat plate

Re⇒Laminar flow

Re>30\times10^5⇒Turbulent flow

<u> Take Re=100,000:</u>

 So this is case of laminar flow

  Nu=0.664Re^{\frac{1}{2}}Pr^{\frac{1}{3}}

From standard air property table at 25°C

  Pr= is 0.71  ,K=26.24\times 10^{-3}

So    Nu=0.664\times 100,000^{\frac{1}{2}}\times 0.71^{\frac{1}{3}}

Nu=187.32   (\dfrac{hL}{K_{air}})

187.32=\dfrac{h\times2.75}{26.24\times 10^{-3}}

     ⇒h=1.78\frac{W}{m^2-K}

heat transfer rate =h(T_∞-T_s)

                           =275.25 \frac{W}{m^2}

<u> Take Re=500,000:</u>

So this is case of turbulent flow

  Nu=0.037Re^{\frac{4}{5}}Pr^{\frac{1}{3}}

Nu=0.037\times 500,000^{\frac{4}{5}}\times 0.71^{\frac{1}{3}}

Nu=1196.18  ⇒h=11.14 \frac{W}{m^2-K}

heat transfer rate =h(T_∞-T_s)

                             =11.14(179-25)

                           = 1,757.77\frac{W}{m^2}

<u> Take Re=1,000,000:</u>

So this is case of turbulent flow

  Nu=0.037Re^{\frac{4}{5}}Pr^{\frac{1}{3}}

Nu=0.037\times 1,000,000^{\frac{4}{5}}\times 0.71^{\frac{1}{3}}

Nu=2082.6  ⇒h=19.87 \frac{W}{m^2-K}

heat transfer rate =h(T_∞-T_s)

                             =19.87(179-25)

                           = 3060.36 \frac{W}{m^2}

7 0
3 years ago
Foundation dampproofing is most commonly installed: Select one: a. on both the inside and outside of the basement wall b. Baseme
puteri [66]

Answer:A

Explanation:

Damp roof is generally applied at basement level which restrict the movement of moisture through walls and floors. Therefore it could be inside or the outside basement walls.

4 0
3 years ago
A student proposes a complex design for a steam power plant with a high efficiency. The power plant has several turbines, pumps,
masha68 [24]

Answer:

(a). max possible efficiency = 55.62%

(b). max power output = = 133.5 MW

Explanation:

From the question we were given the Maximum temperature in the system as

Tmax = 500°C

Minimum temperature in the system Tmin = 70°C

the Heat supplied to the boiler Qb = 240000 KJ/s

we use the temperature conversion factor from °C to K

given T(K) = T (°C) + 273

⇒ Tmax = 500 + 273 = 773 K

⇒ Tmin = 70 + 273 = 343 K

(a). we are to determine the maximum possible thermal efficiency;

(Πth)max = 1 - Tmin/Tmax

(Πth)max = 1 - 343/773  = 0.5562

(Πth)max = 55.62%

(b). to determine the maximum possible power output for the plant we have;

(Πth)max = Wmax/Qb

where Wmax rep the maximum power output

(Πth)max = 0.5562

Qb = 240000

∴ Wmax = 0.5562 × 240000 = 133505.6 Kw

Wmax = 133.5 MW

cheers i hope this helps

3 0
3 years ago
Other questions:
  • What is the impedance of a 5μF capacitor at a frequency of 500Hz? What is the impedance of a60mH inductor at this frequency?
    12·1 answer
  • A fixed mass of saturated water vapor at 400 kpa is isothermally cooled until it is a saturated liquid. Calculate the amount of
    6·1 answer
  • The pressure in an automobile tire depends on the temperature of the air in the tire. When the air temperature is 25°C, the pres
    13·1 answer
  • Convert the following pairs of voltage and current waveforms to phasor form. Each pair of waveforms corresponds to an unknown el
    5·1 answer
  • Cooling fans can be controlled by
    13·1 answer
  • Theo Anh / Chị, để đáp ứng yêu cầu phát triển nền kinh tế thị trường định hướng Xã hội Chủ nghĩa ở Việt Nam trong bối cảnh thời
    10·1 answer
  • Drag each label to the correct location on the chart. Classify the organisms based on how they obtain food.
    14·2 answers
  • Sơ đồ nguyên lý của một hệ thống lạnh
    11·1 answer
  • what is the relationship between the voltages of the output and adjust pins of LM1117 when in normal operation
    7·1 answer
  • Conclude from the scenario below which type of documentation Holly should use, and explain why this would be the best choice
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!