Răspuns:
#include <iostream>
using namespace std;
int main()
{
float a,n,b,k,c,S1,S2;
cout<<"a=";
cin>>a;
cout<<"n=";
cin>>n;
cout<<"b=";
cin>>b;
cout<<"k=";
cin>>k;
cout<<"c=";
cin>>c;
S1=a;
S2=b;
for(int i=2;i<=n;i++)
S1=S1*a;
for(int i=2;i<=k;i++)
S2=S2*b;
double S=(S1+S2)/c;
cout<<S;
return 0;
}
Explicație:
c++, da si tu un multumesc