把写代码过程中比较重要的代码做个记录,下面的资料是关于C语言求1+2!+3!+...+20!的和 的代码,应该能对各位朋友有一些用途。
#include "stdio.h" #include "conio.h" main() { float n,s=0,t=1; for(n=1;n<=20;n++) { s+=t; } printf("1+2!+3!...+20!=%en",s); getch(); }
本文共 203 字,大约阅读时间需要 1 分钟。
把写代码过程中比较重要的代码做个记录,下面的资料是关于C语言求1+2!+3!+...+20!的和 的代码,应该能对各位朋友有一些用途。
#include "stdio.h" #include "conio.h" main() { float n,s=0,t=1; for(n=1;n<=20;n++) { s+=t; } printf("1+2!+3!...+20!=%en",s); getch(); }
转载地址:http://urqil.baihongyu.com/