小编Hap*_*rus的帖子

For循环永远持续下去

不知何故,当我运行这个程序时,它会继续下去,即使我写的方式使它在我达到10时停止.请帮助.

double i;
for(i = 0; i != 10; i+= 0.1){
    printf("%.1f\n", i);
} 
Run Code Online (Sandbox Code Playgroud)

c++ for-loop

1
推荐指数
1
解决办法
115
查看次数

标签 统计

c++ ×1

for-loop ×1