answersLogoWhite

0

#include

using std::cin;
using std::cout;
using std::endl;

int main()
{
int arrSize = 5;
double arr[arrSize] = {0.0};
cout << endl << "Enter 5 numbers to find its total." << endl;
for (int i = 0; i < arrSize; i++)
{
cout << "Enter " << (i + 1) << " element: ";
cin >> arr[i];
}

double sum = 0.0;
for (int i = 0; i < arrSize; i++)
{
sum += arr[i];

}

cout << endl << "Total is: " << sum << endl;


system("PAUSE");
return 0;

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How you write a c program in notepad?

Use the keyboard.


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


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


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?


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

program to find maximum of two numbers using pointers


Write a program to add two 8 bit numbers in microprocessor 8051?

write it in 8085


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


How do you write a VBnet program to find the prime numbers between 100 to 200?

VBnet program to find the prime numbers between 100 to 200?


A program c plus plus on automorphic numbers or not?

how to write a program that counts automorphic number from 1 to 999