-3

Please can you help me with writing the following C program :
Write a program that accepts 10 integer store them in an array and determine the following:
1. sum
11. the average
111. highest
1v. lowest

4
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by geoffy0404
0

Get started.

int main()
{
    //Create array
    //use a for loop to ask user for input
    // for i from 0 to array size   cin >> myArray[i];
   //create a sum,average, high and low variable;
   //Find sum first, initialize it to 0 first;
   //use a for loop from i = 0 to array size and have sum += myArray[i]
   //Next  find average. Average is Sum divided by array size
  //Go on from there and see what happens.
  return 0;
}
0

Please can you help me with writing the following C program :
Write a program that accepts 10 integer store them in an array and determine the following:
1. sum
11. the average
111. highest
1v. lowest

you have to make a variable name(s) for the array with 10 bytes in the memory, then use scanf if you want for asking the user for the input, then, all you have to do for the sum, average, highest, and lowest, is pretty much use your own math equation, within whatever that user had for the input, like for the sum it would be something like

myString[10] = 0

or
myString[1] = 0
myString[2] =0
.
.
.ect
al the way to ten


and then ask the user for 10 integers(numbers)

then make the equation for whatever they put in

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.