【C語言】求1+2!+3!+...+20!的和

#include "stdio.h" main() {   float n,s=0,t=1;   for(n=1;n<=20;n++)   {     t*=n;     s+=t;   }   printf("1+2!+3!...+20!=%e\n",s);   getch(); } 本文出自 「Vs呂小布」 博客,請務必保留此出處http://survive.blog.51cto.com/1
相關文章
相關標籤/搜索