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
A(n) ____ is an object setting used to control the visible display of objects.
KatRina [158]
Remote?? maybe I’m not really sure
3 0
3 years ago
What is an advantage of using a fully integrated cloud-based data analytics platform?
sweet [91]

Answer:

It gives decision-makers the processing capacity they need to turn raw data into useful knowledge.

Explanation:

Data analysis and the associated cycles (data integration, aggregation, hoarding, and revealing) are totally or partially directed in the cloud with cloud analytics.

3 0
2 years ago
What is made in heaven?​
kramer

Answer:

Babies come from heaven didn't you know?

3 0
2 years ago
Is an isothermal process necessarily internally reversible? Explain your answer with an example
torisob [31]

Answer:

please give me brainlist and follow

Explanation:

Example of an irreverseble isothermal process is mixing of two fluids on the same temperature - it requires a lot of energy to unmix Jack and coke. ... Example of an reversible process with changing temperature is isentropic expansion.

5 0
2 years ago
An adiabatic air compressor compresses 10 L/s of air at 120 kPa and 20 degree C to 1000 kPa and 300 degree C.
Oksana_A [137]

Answer:

work=281.4KJ/kg

Power=4Kw

Explanation:

Hi!

To solve follow the steps below!

1. Find the density of the air at the entrance using the equation for ideal gases

density=\frac{P}{RT}

where

P=pressure=120kPa

T=20C=293k

R= 0.287 kJ/(kg*K)= gas constant ideal for air

density=\frac{120}{(0.287)(293)}=1.43kg/m^3

2.find the mass flow by finding the product between the flow rate and the density

m=(density)(flow rate)

flow rate=10L/s=0.01m^3/s

m=(1.43kg/m^3)(0.01m^3/s)=0.0143kg/s

3. Please use the equation the first law of thermodynamics that states that the energy that enters is the same as the one that must come out, we infer the following equation, note = remember that power is the product of work and mass flow

Work

w=Cp(T1-T2)

Where

Cp= specific heat for air=1.005KJ/kgK

w=work

T1=inlet temperature=20C

T2=outlet temperature=300C

w=1.005(300-20)=281.4KJ/kg

Power

W=mw

W=(0.0143)(281.4KJ/kg)=4Kw

5 0
3 years ago
Other questions:
  • Explain three (3) modes of heat transfer in air conditioning system.
    7·1 answer
  • Two balanced Y-connected loads in parallel, one drawing 15kW at 0.6 power factor lagging and the other drawing 10kVA at 0.8 powe
    13·1 answer
  • The line voltage of a balanced three-phase transmission line is 4200 V rms. The transmission line has an impedance of 4 6 Z j l
    12·1 answer
  • You are watching the weather forecast and the weatherman says that strong thunderstorms and possible tornadoes are likely to for
    15·1 answer
  • ). A 50 mm diameter cylinder is subjected to an axial compressive load of 80 kN. The cylinder is partially
    8·1 answer
  • During genetic engineering, how do Restriction enzymes know what base pairs to act on?
    10·1 answer
  • Write a program that asks the user to enter a list of numbers. The program should take the list of numbers and add only those nu
    7·1 answer
  • Which of the following identifies the limitations of green engineering?
    7·1 answer
  • How can feeding plant crops to animals be considered an efficient use of those crops?
    6·1 answer
  • A new approval process is being adapted by Ursa Major Solar. After an opportunity has been approved, the contract is sent to the
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!