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
olga55 [171]
4 years ago
12

Create a program named IntegerFacts whose Main() method declares an array of 10 integers.Call a method named FillArray to intera

ctively fill the array with any number of values up to 10 or until a sentinel value (999) is entered. If an entry is not an integer, reprompt the user.Call a second method named Statistics that accepts out parameters for the highest value in the array, lowest value in the array, sum of the values in the array, and arithmetic average.In the Main() method, display all the statistics in the following format: Note: The inputs were 1, 11, and 999The array has 2 valuesThe highest value is 11The lowest value is 1The sum of the values is 12The average is 6 using static System.Console;class IntegerFacts{ static void Main() { // Write your main here } public static int FillArray(int[] array) { } public static void Statistics(int[] array, int els, out int high, out int low, out int sum, out double avg) { } }

Engineering
1 answer:
musickatia [10]4 years ago
8 0

Answer:

C# codee

using System;

class IntegerFacts

{

static void Main()

{

int[] x = new int[10];

int sum = 0;

int siz = 0, high = 0, low = 0, avg = 0;

siz = FillArray(x);

Statistics(x, ref high, ref low, ref sum, ref avg, siz);

Console.Write("The highest value is " + high);

Console.Write("\nThe lowest value is " + low);

Console.Write("\nThe sum of the values is " + sum);

Console.Write("\nThe average is " + avg);

}

static void Statistics (int [] b, ref int h, ref int l, ref int s, ref int a, int size)

{

if (size == 0)

h = l = s = a = 0;

else

{

int i =0;

l = 999;

h = 0;

s = 0;

for (; i < size;++i)

{

if(b[i] > h)

h = b[i];

if(b[i] < l)

l = b[i];

s += b[i];

}

a = s / size;

}

}

static int FillArray (int[] a)

{

int i = 0, count = 0;

int intTemp =0 ;

string temp;

for(i = 0 ; i < 10 ; i++)

{

Console.Write("Enter element number"+(i+1) +" : ");

temp = Console.ReadLine();

if (int.TryParse(temp, out intTemp)) {

if (intTemp != 999)

{

a[i] = intTemp;

count++;

}

else

break;

}

else

{

Console.Write("\n\nOops.. You entered a wrong number. Try again \n\n");

i--;

}

}

return count;

}

}

Explanation:

The output of the above program is given in the attached file.

You might be interested in
Before installing head gaskets look for “____” labels on the head gaskets
Strike441 [17]

Before installing head gaskets, you should look for "this side up" or "front" labels on the head gaskets.

<h3>What is a head gasket?</h3>

A head gasket can be defined as a gasket which is fitted between the engine block and the cylinder head in an internal combustion engine, so as to seal oil passages and absorb the pressures of the combustion that occurs inside the engine.

As a general rule, you should look for "this side up" or "front" labels on the head gaskets before installing head gaskets in an internal combustion engine of a vehicle.

Read more on head gaskets here: brainly.com/question/1264437

#SPJ1

7 0
2 years ago
The worst case signal-to-noise ratio at the output of an FM detector occurs when: ________
AlexFokin [52]

Answer:

a. the desired signal is 90 degrees out of phase with the intelligence signal.

Explanation:

The signal to noise ratio of FM detector is defined as function of modulation index for SSB FM signal plus narrow band Gaussian noise at input. The ratio is usually higher than 1:1 which indicates more signals than noise.

6 0
3 years ago
1. How many board feet in piece of Oak that is 1" thick 6" wide and 8' long?
enyata [817]

Answer:

  4

Explanation:

A "board foot" is 1/12 of a cubic foot. It is the volume of a board 1" thick and 1 foot square.

Here, the board is 1" thick, so the number of board feet is numerically equal to the number of square feet of area it has.

  (1/2 ft)(8 ft) = 4 ft²

The number of board feet is 4.

7 0
4 years ago
The manufacturer of a 1.5 V D flashlight battery says that the battery will deliver 9 mA for 40 continuous hours. During that ti
Jet001 [13]

Answer:

a) 144.000 s

b) and c)Battery voltage and power plots in attached image.

   V=-\frac{0.5}{144000} t + 1.5 V[tex]    [tex]P(t)=-(31.25X10^{-9}) t+0.0135  where D:{0<t<40} h

d) 1620 J

Explanation:  

a) The first answer is a rule of three

s=\frac{3600s * 40h}{1h} = 144000s

b) Using the line equation with initial point (0 seconds, 1.5 V)

m=\frac{1-1.5}{144000-0} = \frac{-0.5}{144000}

where m is the slope.

V-V_{1}=m(x-x_{1})

where V is voltage in V, and t is time in seconds

V=m(t-t_{1}) + V_{1} and using P and m.

V=-\frac{0.5}{144000} t + 1.5 V[tex] c) Using the equation VPOWER IS DEFINED AS:[tex] P(t) = v(t) * i(t) [tex]so.[tex] P(t) = 9mA * (-\frac{0.5}{144000} t + 1.5) [tex][tex]P(t) = - (31.25X10^{-9}) t + 0.0135

d) Having a count that.

E = \int\limits^{144000}_{0} {P(t)} \, dt  = \int\limits^{144000}_{0} {v(t)*i(t)} \, dt

E = \int\limits^{144000}_{0} {-\frac{0.5}{144000} t + 1.5*0.009} \, dt = 1620 J

4 0
3 years ago
What is a truss? What separates a truss from a frame and other forms of rigid bodies?
tangare [24]

Answer:

The application of force is the main difference between truss and frame.

Explanation:

<u>Truss: </u>

Truss is a collection of beams,which use to handle the tensile and   compression loads . That collection of beams creates rigid structure.

The load on the truss will be acting always at the  at the hinge. Truss is     widely used in the construction areas.                

<u>Frame:</u>

       Like truss, it is also a combination of beams and used to handle the loads. The main difference between truss and frame is the application of load. In the frame load can apply at the any point of the member of frame along  with hinge.

Truss are connected by pin joint and can not transfer moment ,on the other hand frames are connected by rigid joint like welding so frame can transfer moment.

Truss and frame both forms a rigid structure and is used in the construction areas.  

               

7 0
4 years ago
Other questions:
  • Write a function that multiplies two decimal string representations of non-negative integers. The function takes two parameters
    9·1 answer
  • A ball slowly starts to roll downhill, but its speed increases as it rolls. How are the ball's speed and energy related? - Why d
    9·1 answer
  • If an AC circuit contains both resistive and capacitive components, w
    11·1 answer
  • The mean of 10 numbers is 9, then the sum (total) of these numbers will be​
    10·2 answers
  • Three capillary tubes with different radius (r1=1.0mm, r2=0.1mm, r3=0.01mm) are inserted into the same cup of water. The surface
    14·1 answer
  • Solve using Matlab the problems:
    12·1 answer
  • Pointttttttttttttssssssssssss
    12·1 answer
  • En que consiste la ley del emprendimiento ?
    13·1 answer
  • Liquid methanol is pumped from a large storage tank through a 1-in.ID pipe at a rate of 3.00gal/mm.
    5·1 answer
  • All aspects of the Kirby-Bauer test are standardized to assure reliability. What might be the consequence of pouring the plates
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!