#include <stdio.h>

int main() {
    int i;
    i=0; //선언: 언제부터 반복할 건지
    while(i<3){ //조건: 언제까지 반복할 건지
        i++; //증감: 얼마만큼 커지거나 작아질 건지
    }

    i = 0;
    while(i<10){
        printf("%d\n", i);
        i++;
    }

    // 무한 반복 가능
    // i = 0;
    // while(1){
    //     printf("%d", i);
    //     i++;
    // }

    i = 0;
    do{
        printf("%d\n", i);
        i++;
    }while(i<3);
    
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: