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
determine the position d of the 6- kn load so that the average normal stress in each rod is the same.
Zinaida [17]

The load is placed at distance 0.4 L from the end of $$12 \mathrm{~mm}^{2} $ area.

<h3>What is meant by torque?</h3>

The force that can cause an object to rotate along an axis is measured as torque. Similar to how force accelerates an item in linear kinematics, torque accelerates an object in an angular direction. A vector quantity is torque.

Let the beam is of length L

Now the stress on both the end is the same now we can say that torque on the beam due to two forces must be zero

$N_1 * x=N_2 *(L-x)$

also, we know that stress at both ends are same

$\frac{N_1}{12}=\frac{N_2}{8}$

$2 * N_1=3 * N_2$

Now from two equations we have

$\frac{3}{2} N_2 * x=N_2 *(L-x)

solving the above equation we have

$x=\frac{2}{5} L

so the load is placed at distance 0.4 L from the end of $$12 \mathrm{~mm}^{2} $ area.

The complete question is:

47. the beam is supported by two rods ab and cd that have cross-sectional areas of $$12mm^2 and $$8mm^2, respectively. determine the position d of the 6-kn load so that the average normal stress in each rod is the same.

To learn more about torque refer to:

brainly.com/question/20691242

#SPJ4

7 0
2 years ago
Two engineers are to solve an actual heat transfer problem in a manufacturing facility. Engineer A makes the necessary simplifyi
deff fn [24]

Answer:

Engineer A results will be more accurate

Explanation:

Analytical method is better than numerical method. Engineer A has used analytical method and therefore his results will be more accurate because he used simplified method. Engineer B has used software to solve the problem related to heat transfer his results will be approximate.

5 0
2 years ago
Miles (322,000 kilometers [km]) or
slega [8]
The answer is B . have a good day
3 0
3 years ago
Read 2 more answers
Nancy wants to buy a cooking stove that’s electrically insulated and resistant to heat. What material should she choose for the
astra-53 [7]

Answer:

Ceramics

Explanation:

Ceramics are used to make cooktops if you look it up and according to my engineering and design class ceramics have high heat resistance and melting points, and make good electrical insulators.

3 0
2 years ago
Describe each occupation
vitfil [10]

Answer:

Carpenter — A carpenter is someone who works with wood. They build houses and make cabinets etc.

Logging —  Loggers are people who cut trees. They use strong chain saws to cut trees.

Shipwrights — Shipwrights build, design, and repair all sizes of boats.

Wood Machinist — Wood Machinists repair and cut timber or any kind of wood for construction projects. They also operate woodworking machines, as their name suggest.

Furniture finishers —  Furniture finishers shape, decorate, and restore damaged and worn out furniture.

5 0
2 years ago
Other questions:
  • Water at 20 bar and 400 C enters a turbine operating at steady state and exits at 1.5 bar. Stray heat transfer and kinetic and p
    14·1 answer
  • When watching your weight, you want to snack smart. To do that, you want a snack that is going to __________.
    13·1 answer
  • Plz help me
    12·1 answer
  • Classify the terms as related to a thermal system or mechanical system.
    8·1 answer
  • A square isothermal chip is of width w = 5 mm on a side and is mounted in a substrate such that its side and back surfaces are w
    7·1 answer
  • Ok there..............................................
    6·1 answer
  • Electrical circuits must be locked-out/tagged-out before electricians work on any equipment. Is this true or false?
    15·1 answer
  • What are the environmental factors that cause the formation of rust?
    7·1 answer
  • Limestone scrubbing is used to remove SO2 in a flue gas desulfurization (FGD) system. Relevant reactions are given below. A lime
    8·1 answer
  • How can the use of local materials improve the standard of living of Filipinos?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!