(C语言)求1k+2k+3k+...............nk的值
#include "stdio.h"int f(int n,int k){ int i,j,s,t; for(s=0,i=1;i<=n;s+=t,i++) for(t=j=1;j<=k;t*=i,j++); return s;}int main(int argc,char *argv[]){ int n,k; printf("Please neter n & k(int 0<n,k)...\n"); if(sc.
原创
2021-05-20 21:50:06 ·
3657 阅读 ·
1 评论