修改《C程序设计》P32页程序2.18,使其可以算出1*3*5*7*9*11*13。
#include <stdio.h>
int main()
{
int i,t;
t=1;
i=3;
while (i<=13)
{
t=t*i;
i=i+2;
}
printf("%d\n",t);
return 0;
}
修改《C程序设计》P32页程序2.18,使其可以算出1*3*5*7*9*11*13。
#include <stdio.h>
int main()
{
int i,t;
t=1;
i=3;
while (i<=13)
{
t=t*i;
i=i+2;
}
printf("%d\n",t);
return 0;
}