Computer Science, asked by sakshisakhare42, 7 months ago

observe the following block of code and determine what happens when x=2? #include<iostream.h> void main ()
{ int a,d,n,sum,teram=0;
cout<<"enter the first term,common difference,"<<"and the number of terms to be summed"<<"respectively:\n"; cin>>a>>d>>n;.
sum=0
int i=1;
cout<<"\n the terms are";.
do
{
term=a+=(i-1)+d;
sum+=term;
cout<<term<<" ";
++i;
}
while (i<=n);
cout<<"\n the sum of A.P. is "<<sum;
}
} ​

Answers

Answered by pandey2016deepak
2

Answer:

your code is not understandable and has too many errors..

Explanation:

this can't be answered.

Answered by vaibhabeel
0

Answer:

I couldn't understand your words please write your question

Similar questions