【C语言初阶】输出1-100的奇数

int main()
{
    
    
	int i = 1;
	while (i <= 100)
	{
    
    
		if (i % 2 == 1)
		{
    
    
			printf("%d ", i);
		}
		i++;
	}
	return 0;
}

猜你喜欢

转载自blog.csdn.net/weixin_43762735/article/details/107996077