answersLogoWhite

0


Best Answer

#include

using namespace std;

int main()

{

int numberOfElemenets = 10;

double myArray[numberOfElements] = {0.0};

double sum = 0;

for (int index = 0; index < numberOfElements; index++)

{

cout << "Enter " << (index + 1) << " number: ";

cin >> myArray[index];

}

for (int index = 0; index

{

sum += myArray[index];

}

cout << "\nSum of all elements: " << sum << endl;

cout << "Avarage is: " << (sum/numberOfElements) << endl;

return 0;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a C program to accept 10 numbers and find the sum and average?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a c program to accept a numbers and generate square root cube and exponential values?

write a c program to accept a number and generate a square root cube and exponential values


Write the program in qbasic and add two numbers?

Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end


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?


Write a program to accept 2 numbers and tell whether the product of the two number is equal to or greater than 1000?

C programm


How do you write the average n numbers program in c language?

Write your program and if you are having a problem post it here with a description of the problem you are having. What you are asking is for someone to do your homework for you. no i am asking to verify my answer


How do you write BASIC program to accept variables?

dim a input a


Write a program in Lex to eliminate white space and collect numbers as a token?

write a lex program to delete space from the program


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


How to write a program to accept the user name and password and then shop this is your Password?

you cant


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html


How do you write a program in objective c numbers 1-100 prime numbers?

fdsgfhgdfhgdf


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers