编程论坛's Archiver

billtob 发表于 2007-11-20 22:10

请教一下这道!用for循环怎么做!

求1+2!+3!+…+10!的和!<BR>2!是什么意思呀!

zhouqingwuji 发表于 2007-11-20 22:12

阶乘啊,哥哥,你的数学怎么学的

billtob 发表于 2007-11-20 22:18

谢啦@<BR>[em17][em17][em17]

随缘漂流 发表于 2007-11-20 22:28

<P>int i=1,j=1;<BR>long count=0,count1=0;<BR>for(j,j&lt;11,j++)<BR>{<BR>for(i,i&lt;j,i++)<BR>{count1=count1+i*(i-1);<BR>}<BR>count=count+count1;<BR>}</P>

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.