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
Ages have been identified by the materials developed and used in those eras.
Westkost [7]
Ok what is the question
6 0
2 years ago
Read 2 more answers
For which of 'water' flow velocities at 200C can we assume that the flow is incompressible ? a.1000 km per hour b. 500 km per ho
ad-work [718]

Answer:d

Explanation:

Given

Temperature=200^{\circ}\approc 473 K

Also \gamma for air=1.4

R=287 J/kg

Flow will be In-compressible when Mach no.<0.32

Mach no.=\frac{V}{\sqrt{\gamma RT}}

(a)1000 km/h\approx 277.78 m/s

Mach no.=\frac{277.78}{\sqrt{1.4\times 287\times 473}}

Mach no.=0.63

(b)500 km/h\approx 138.89 m/s

Mach no.=\frac{138.89}{\sqrt{1.4\times 287\times 473}}

Mach no.=0.31

(c)2000 km/h\approx 555.55 m/s

Mach no.=\frac{555.55}{\sqrt{1.4\times 287\times 473}}

Mach no.=1.27

(d)200 km/h\approx 55.55 m/s

Mach no.=\frac{55.55}{\sqrt{1.4\times 287\times 473}}

Mach no.=0.127

From above results it is clear that for Flow at velocity 200 km/h ,it will be incompressible.

5 0
3 years ago
About ceramics: Only can be optically opaque or semi-transparent. a) True b)-False
julia-pushkina [17]

Answer: True

Explanation: Ceramics have the property that when the band gap present between the atoms are larger than the light energy then the tend to become opaque because the light scattering is caused . They also show the property of being translucent when there are chances of the light to get a path through the surface of ceramic so they get the light at some parts e.g.porcelain .Therefore the statement given is true that ceramics can be optically opaque or semi-transparent(translucent).

6 0
3 years ago
A particular motor rotates at 3000 revolutions per minute. What is its speed in rad/sec, and how many seconds does it takes to m
Leno4ka [110]

Answer:

ω=314.15 rad/s.

0.02 s.

Explanation:

Given that

Motor speed ,N= 3000 revolutions per minute

N= 3000 RPM

The speed of the motor in rad/s given as

\omega=\dfrac{2\pi N}{60}\ rad/s

Now by putting the values in the above equation

\omega=\dfrac{2\pi \times 3000}{60}\ rad/s

ω=314.15 rad/s

Therefore the speed in rad/s will be 314.15 rad/s.

The speed in rev/sec given as

\omega=\dfrac{ 3000}{60}\ rad/s

ω= 50 rev/s

It take 1 sec to cover 50 revolutions

That is why to cover 1 revolution it take

\dfrac{1}{50}=0.02\ s

4 0
2 years ago
..................................................
Scorpion4ik [409]
..................................................
3 0
3 years ago
Read 2 more answers
Other questions:
  • What is the zone that has just been added to the exchange zone where athletes may now hand off the baton
    5·1 answer
  • A gear and shaft with nominal diameter of 34 mm are to be assembled with a medium drive fit (H7/s6). The gear has a hub, with an
    9·1 answer
  • It is said that Archimedes discovered his principle during a bath while thinking about how he could determine if KingHiero‘s cro
    15·1 answer
  • A 5000-lb truck is being used to lift a 1000-lb boulder B that is on a 200-lb pallet A. Knowing that the truck starts from rest
    8·1 answer
  • If these components have weights WA = 50000 lb , WB=8000lb, and WC=6000lb, determine the normal reactions of the wheels D, E, an
    14·1 answer
  • Write Python expressions using s1, s2, and s3 and operators and * that evaluate to: (a) 'ant bat cod'
    14·1 answer
  • Architects design roads.<br><br> A. True<br> B. False
    9·2 answers
  • Roku internet service providet​
    11·1 answer
  • HOW DO I FIX THIS SIDE BAR ITS THE FIRST TIME THIS HAPPEND (the black bar with all my things)
    13·2 answers
  • Which of these processes uses a die and a press to form parts?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!