2025-03-06 22:46:33 +08:00

18 lines
392 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*-------------------------------------------------------
功能编程实现求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);
}