程序如下:#include#includevoid main(){ int i,n,sum = 0; scanf("%d",&n); for(i = 1;i < n;i ++) { sum += pow(i,i); } printf("%d",sum);}