代码如下:
#include <stdio.h>
int main()
{
int i = 1;
while (i <= 100)
{
if (i % 2 == 1)
printf("%d ", i);
i++;
}
return 0;
}
运行结果:
、
代码如下:
#include <stdio.h>
int main()
{
int i = 1;
while (i <= 100)
{
if (i % 2 == 1)
printf("%d ", i);
i++;
}
return 0;
}
运行结果:
、