65,211
社区成员
发帖
与我相关
我的任务
分享int i;
for(i = 0; i < 9; ++i) {
printf("%d", ++i);
if(i == 9) {
i = 0;
}
}#include <stdio.h>
int main(void)
{
int table[] = { 1, 3, 5, 7, 9, 2, 4, 6, 8 }, i;
for (i = 0; i < sizeof table/sizeof *table; ++i)
printf("%d\n", table[i]);
return 0;
}#include <stdio.h>
int main(int argc, char *argv[])
{
int i;
for(i=0;i<=8;i++)
printf("%d\n",2*i%9+1);
return 0;
}#include <stdio.h>
#include <math.h>
int main(void)
{
int i;
for (i=1;i<10;i++)
{
double t=1133 - (872819*i)/280. + (109725*pow(i,2))/32. - (580513*pow(i,3))/288. +
(90563*pow(i,4))/128. - (149087*pow(i,5))/960. + (1375*pow(i,6))/64. -
(611*pow(i,7))/336. + (11*pow(i,8))/128. - pow(i,9)/576.;
printf("%.f\n",t);
}
return 0;
}