I getting expected primary expression before '=' in line 24 . And after a lot of efforts, I realized that may I am half blind. Please tell me, what primary expression are they talking about?
//question 2
#include<iostream>
#include<math.h>
usingnamespace std;
void AddSeries(int);
int main(){
cout<<"Please enter the value of 'n'...\n";
int n;
cin>>n;
AddSeries(n);
return 0;
}
void AddSeries(int n){
int sum=0, Ssum=0;
for(int a=1; a< = n; a++){// error at this line
for(int b = 1; b<=a; b++)
Ssum+=b;
sum+=pow(Ssum, a);
}
cout<<"So the required ans is "<<sum;
}