Tuesday, October 26, 2021

[C] continue

#include <stdio.h>


int main()
{
    printf("Start\n");
    
    int max_i = 10;
    int i = 0;
    
    while (i < max_i) {
         i++;
        if ((i/2) == 0) {
            printf("Hello World i:%d\n",i);
            continue;
        } else {
            printf("Hi World i:%d\n",i);
        }
        printf("while end\n");
    }
    return 0;
}
==============================================================

Start
Hello World i:1
Hi World i:2
while end
Hi World i:3
while end
Hi World i:4
while end
Hi World i:5
while end
Hi World i:6
while end
Hi World i:7
while end
Hi World i:8
while end
Hi World i:9
while end
Hi World i:10
while end

No comments:

Post a Comment

n8n index

 【n8n免費本地端部署】Windows版|程式安裝x指令大補帖  【一鍵安裝 n8n】圖文教學,獲得無限額度自動化工具&限時免費升級企業版功能