while循环
#include<stdio.h>
int main()
{
int i=0;
while (i<=100)
{
i++;
if(i%2==1)
printf("%-3d",i);
}
return 0;
}
for循环
#include<stdio.h>
int main()
{
int i =0;
for (i=1;i<=100;i++)
{
if(i%2==1)
printf("%-3d",i);
}
return 0;
}