第二章 算法---程序的靈魂

第二章 算法—程序的靈魂 例2.16 求5! 例2.17 求多項式1-1/2+1/3-1/4+…+1/99-1/100的值 例2.16 求5! #include <stdio.h> int main() { int i,t; t=1; i=2; while(i<=5) { t=t*i; i=i+1; } printf("%d\n",t); return 0; } 運行結果如下
相關文章
相關標籤/搜索