while 语句

流程图

C语言 while

 

案例

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>

int main(void)
{
    // 格式:while (表达式){}
    // 循环:每次循环将变量i加1直到10停止
    int i = 0;
    while (i < 10)
    {
        printf("%d\n", i);
        i++;
    }
    return 0;
}
while 使用案例

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2021-06-19
  • 2021-12-30
相关资源
相似解决方案