例2.1 求5! #include<stdio.h> int main() { int i,t; t=1; i=2; while(i<=5) { t=t*i; i=i+1; } printf("%d",t); return 0; } 运行结果如下