gpt4 book ai didi

c - 如何在一行上获得输出?

转载 作者:行者123 更新时间:2023-11-30 19:08:36 26 4
gpt4 key购买 nike

我有这个程序,它可以为我提供所有正确的输出,但由于某种原因,我无法将它们放在一行上。下面显示的是作业所需代码的执行示例。

最佳答案

这应该可以

printf("Boiler Numbers [%d,%d]:",start,end);
for (x = start; x <= end; x++)
{
output = (x * (x + 1)) / 2;
printf("%d ", output++);
}

关于c - 如何在一行上获得输出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44858903/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com