Files
class-notes/2207/天天乐学答案/源码/C语言-2/4.c
T
2025-03-06 22:46:33 +08:00

18 lines
392 B
C

/*-------------------------------------------------------
功能:编程实现求1-10(包含1,不包含10)之间的所有数的乘积并输出。(使用while)
--------------------------------------------------------*/
#include <stdio.h>
main( )
{
int i=1, sum=1;
/**********Program**********/
while(i<10){
sum*=i;
i++;
}
/********** End **********/
printf("the sum of odd is :%d\n",sum);
}