i have been given a series and ihave to find its sum. i'm just a beginner so pleese keep ur program simple; series is like this; 2^2 + ( 2^2+ 4^4) + (2^2 + 4^4 + 6^6).... take in number of terms from user.
Take this and from next time try to do your assignment of your own:- Code: #include<conio.h> #include<iostream.h> #include<math.h> void main() { clrscr(); int n,t=2; long int total=0,subtotal; cout<<"Enter term :"; cin>>n; cout<<"\n\t"; for(int i=0;i<n;i++) { cout<<"("; for(int j=0;j<=i;j++) { subtotal=pow((j+1)*2,(j+1)*2); cout<<(j+1)*2<<"^"<<(j+1)*2; if(j<i) cout<<"+"; } total+=subtotal; cout<<")"; if(i<n-1) cout<<"+"; } cout<<"\n\n\t"<<total; getch(); }