76 974
Assignments Done
Successfully Done
In June 2019

Answer to Question #26056 in C++ for muhammad ismail iqbal

Question #26056
Write a C++ program to find the sum and average of one dimensional integer array
Expert's answer
#include <iostream>

using namespace std;

void main()
int length= 10;
int sum =0;
int avg =0;

for(int i =0; i < length; i++)
sum+= A[i];

avg = sum /length;

cout<< "Sum: " << sum << endl;
cout<< "Average: " << avg << endl;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions