小编Tus*_*shi的帖子

循环时while(1)vs while(3)或任何数字

使用while循环时写入while(1)与任何其他数字相比意味着什么?

在我的计划while(1)中给我同样的答案while(3)

int num1;
int loopcount;

while(1) {
    printf("enter your positive number:");
    scanf("%d",&num1);
    if(num1>0) {
        break;
    }
}
Run Code Online (Sandbox Code Playgroud)

loops while-loop do-while

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

标签 统计

do-while ×1

loops ×1

while-loop ×1