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
2
Answer:
your code is not understandable and has too many errors..
Explanation:
this can't be answered.
Answered by
0
Answer:
I couldn't understand your words please write your question
Similar questions
Math,
2 months ago
Chemistry,
2 months ago
Biology,
6 months ago
English,
6 months ago
Computer Science,
10 months ago
English,
10 months ago
CBSE BOARD X,
10 months ago