#includeusing namespace std;void main(){int i,m=1,k,n;int sum=0;cout<<"请输入k的值";cin>>k>>n;for(i=1;i<=k;i++){ m*=n; sum+=m;}cout<<"n的m次方为:\n"<cout<<"幂得和为:\n"<}