76 836
Assignments Done
Successfully Done
In June 2019

Answer to Question #22178 in C++ for emmanuel

Question #22178
write a program using c++ to find the sum of arithmetic progression below. 6,10,14,18,20
Expert's answer
#include <iostream>
int main()
int a[] ={6,10,14,18,20};
int n=5; //number of elements in a
int sum = 0;
for(int i=0; i<n;i++)
sum +=a[i];
std::cout<< "The sum of progression is " << sum <<
return 0;

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!


Assignment Expert
17.01.13, 14:10

You're welcome. We are glad to be helpful.
If you really liked our service please press like-button beside answer field. Thank you!

17.01.13, 08:07

thank you very much it works 100%.you are great!!!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions