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]
3 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]3 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
What else will change, if you change the point of view
JulijaS [17]

Answer:

We would need background context,

Explanation:

Then I would be happy to help!

4 0
2 years ago
What factors are likely to promote the formation of stress corrosion cracks?
Naddika [18.5K]

Answer:

Stress corrosion cracking

Explanation:

This occurs when susceptible materials subjected to an environment that causes cracking effect by the production of folds and tensile stress. This also depends upon the nature of the corrosive environment.

Factors like high-temperature water, along with Carbonization and chlorination, static stress, and material properties.

7 0
3 years ago
In RSA Digital Signature, Suppose Bob wants to send a signed message (x = 4) to Alice. The first steps are exactly t eps are exa
Luda [366]

Answer:

what r u on

Explanation:

4 0
3 years ago
Match the word with the definition:
aksik [14]

1. Renewable Resources  = (Renewable means you can keep making it) =  resources that can be replenished (such as trees)

2. Nonrenewable Resources  =  ( Nonrenewable means it can't be made once it is used up) = resources that are gone once they are used (such as fossil fuels)

3. Producer  =  ( produces something) = person who makes goods or provides services

4. Consumer  = ( uses something) =   person whose wants are satisfied by using goods and services

5. Allocate  = ( put someplace) =   distribute

6. Choice =  option

7 0
3 years ago
Read 2 more answers
How does a catapult incorporate technology?
storchak [24]
I’m sure the answer is correct and it is below
“ A catapult works because energy can be converted from one type to another and transferred from one object to another. ... This energy is stored in the launching device as potential, or stored, energy. The catapult you are about to make uses elastic potential energy stored in a wooden stick as you bend it.”
6 0
3 years ago
Other questions:
  • A milling operation was used to remove a portion of a solid bar of square cross section. Forces of magnitude P = 18 kN are appli
    15·1 answer
  • Rolling and Shearing are the types of a)-Bulk Deformation Process b)- Sheet Metal Process c)- Machining Process d)- Both a &amp;
    7·1 answer
  • If the electric field just outside a thin conducting sheet is equal to 1.5 N/C, determine the surface charge density on the cond
    9·1 answer
  • For the following three (3) questions, assume that the link layer uses the flag bytes with byte stuffing approach for framing, w
    15·1 answer
  • Do all websites use the same coding to create?
    8·1 answer
  • A 500-km, 500-kV, 60-Hz, uncompensated three-phase line has a positivesequence series impedance. z = 5 0.03 1 + j 0.35 V/km and
    11·1 answer
  • HI! If you love the art that is good. My teacher Mrs. Armstrong is the best paintings ever year. Come to Mountain View Elementar
    10·2 answers
  • What is the built-in pollution control system in an incinerator called
    6·1 answer
  • A panel crimper cuts metal True or False
    10·1 answer
  • As you have learned, not all motor oils are the same. What are two things that make them different?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!