09-17 16:42
Notice
Recent Posts
Recent Comments
반응형
관리 메뉴

BAN2ARU

CODEUP 1079번 본문

Coding Test/CodeUp

CODEUP 1079번

밴나루 2021. 11. 5. 15:01

https://codeup.kr/problem.php?id=1079

#include <stdio.h>

int main()
{
    char input;
    scanf("%c ", &input);
    
    while(input != 'q')
    {
        printf("%c\n", input);
        scanf("%c ", &input);
    } //input이 'q'가 아니면 input을 출력하고 다음 문자 스캔
    
    printf("q"); //input이 'q'이면 while문이 종료되므로 마지막으로 'q'출력
    
    return 0;
    
}
728x90

'Coding Test > CodeUp' 카테고리의 다른 글

CODEUP 6072번  (0) 2022.03.09
Codeup 6099번  (0) 2021.11.11
CODEUP 6033번  (0) 2021.11.10
CODEUP 1099번  (0) 2021.11.08
CODEUP 1076번  (0) 2021.11.05
Comments