본문 바로가기

코드업 기초 100제

1071 : [기초-반복실행구조] 0 입력될 때까지 무한 출력하기1

#include <iostream>

using namespace std;

int main() {
    int a;
    
    
    while(1){
        scanf("%d",&a);
        if(a==0) return 0;
        else printf("%d\n",a);
    }

}