answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: How do you write a program that accepts 5 integers in an array and shows the average of 3?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is Jagged Array in C?

A Jagged array is an array of arrays. You can initialize a jagged array as − int[][] scores = new int[2][]{new int[]{92,93,94},new int[]{85,66,87,88}}; Where, scores is an array of two arrays of integers - scores[0] is an array of 3 integers and scores[1] is an array of 4 integers.


Could you Write a program for 8086 microprocessor that displays on the monitor the average of 2 numbers from an array?

How to write a program for mouse in microprocessor?


Declare an array of 100 integers?

int array_name [100];


Java program to solve lucky number?

Look at the definition, http://en.wikipedia.org/wiki/Lucky_number , then create an array of integers and start working on it. The sieve method requires you to eliminate certain numbers; you can either replace the eliminated array elements with a marker, or move the non-eliminated elements towards the beginning of the array (overwriting the eliminated elements), or perhaps copy to a different array - depending on whether you want simplicity in programming (putting a marker, such as 0, is probably easier to program), or efficiency.Look at the definition, http://en.wikipedia.org/wiki/Lucky_number , then create an array of integers and start working on it. The sieve method requires you to eliminate certain numbers; you can either replace the eliminated array elements with a marker, or move the non-eliminated elements towards the beginning of the array (overwriting the eliminated elements), or perhaps copy to a different array - depending on whether you want simplicity in programming (putting a marker, such as 0, is probably easier to program), or efficiency.Look at the definition, http://en.wikipedia.org/wiki/Lucky_number , then create an array of integers and start working on it. The sieve method requires you to eliminate certain numbers; you can either replace the eliminated array elements with a marker, or move the non-eliminated elements towards the beginning of the array (overwriting the eliminated elements), or perhaps copy to a different array - depending on whether you want simplicity in programming (putting a marker, such as 0, is probably easier to program), or efficiency.Look at the definition, http://en.wikipedia.org/wiki/Lucky_number , then create an array of integers and start working on it. The sieve method requires you to eliminate certain numbers; you can either replace the eliminated array elements with a marker, or move the non-eliminated elements towards the beginning of the array (overwriting the eliminated elements), or perhaps copy to a different array - depending on whether you want simplicity in programming (putting a marker, such as 0, is probably easier to program), or efficiency.


How will you initialize a 2-d array?

All arrays are one-dimensional. A two-dimensional array is simply a one-dimensional array of one-dimensional arrays: int a[2][3]; This is an array of 2 elements where each element is itself an array of 3 integers. In other words it is an array of 6 integers. The two dimensions simply allow us to split the array into two sub-arrays of 3 elements each.

Related questions

How do you write a program that accepts 50 integer values and sort them in basic programming?

Create an array with 50 elements and input the integers one a time, filling the array. Use an insertion sort on the array for each input except the first. Alternatively, input the values first and then use insertion sort.


8086 assembly program to sort a list of integers?

assembly language program for sorting an array using 8086 microprocessor.


What is Jagged Array in C?

A Jagged array is an array of arrays. You can initialize a jagged array as − int[][] scores = new int[2][]{new int[]{92,93,94},new int[]{85,66,87,88}}; Where, scores is an array of two arrays of integers - scores[0] is an array of 3 integers and scores[1] is an array of 4 integers.


What is an associative array?

An associative array is one of a number of array-like data structures where the indices are not limited to integers.


What is the difference between numeric array and associative array?

Numeric array has numbers(+integers) that represent the values Associative array has strings that represent the values


Could you Write a program for 8086 microprocessor that displays on the monitor the average of 2 numbers from an array?

How to write a program for mouse in microprocessor?


Declare an array of 100 integers?

int array_name [100];


Java program to solve lucky number?

Look at the definition, http://en.wikipedia.org/wiki/Lucky_number , then create an array of integers and start working on it. The sieve method requires you to eliminate certain numbers; you can either replace the eliminated array elements with a marker, or move the non-eliminated elements towards the beginning of the array (overwriting the eliminated elements), or perhaps copy to a different array - depending on whether you want simplicity in programming (putting a marker, such as 0, is probably easier to program), or efficiency.Look at the definition, http://en.wikipedia.org/wiki/Lucky_number , then create an array of integers and start working on it. The sieve method requires you to eliminate certain numbers; you can either replace the eliminated array elements with a marker, or move the non-eliminated elements towards the beginning of the array (overwriting the eliminated elements), or perhaps copy to a different array - depending on whether you want simplicity in programming (putting a marker, such as 0, is probably easier to program), or efficiency.Look at the definition, http://en.wikipedia.org/wiki/Lucky_number , then create an array of integers and start working on it. The sieve method requires you to eliminate certain numbers; you can either replace the eliminated array elements with a marker, or move the non-eliminated elements towards the beginning of the array (overwriting the eliminated elements), or perhaps copy to a different array - depending on whether you want simplicity in programming (putting a marker, such as 0, is probably easier to program), or efficiency.Look at the definition, http://en.wikipedia.org/wiki/Lucky_number , then create an array of integers and start working on it. The sieve method requires you to eliminate certain numbers; you can either replace the eliminated array elements with a marker, or move the non-eliminated elements towards the beginning of the array (overwriting the eliminated elements), or perhaps copy to a different array - depending on whether you want simplicity in programming (putting a marker, such as 0, is probably easier to program), or efficiency.


Write a function in java that accepts an array of integers and returns the second largest integer in the array Return -1 if there is no second largest?

Method 1: Sort the array in descending order, compare 1st and 2nd if not same , return 2nd if same return -1 Method 2: Find the largest number in the array, initialize another array with dimension 1 less than of original. Copy the array elements from the original array minus the largest element. not select largest from the second array and compare with the previous one if not same return the second largest if same return -1


Array subscripts are always a large numbers b characters c negative values d integers?

d integers


What is meant by array with in structure in c language?

It means a structure has a member that is an array: typedef struct foo { int x[42]; // an array of 42 integers // other members... };


What is the difference between a numericial array and an associative array?

A numericial array is an array with keys made up of only integers. An associative array is an array with keys made up of anything that is not an integer. In some languages, it is possible to mix integer keys and non-integer keys into a mixed array.