본문 바로가기
Computer Science

모음이 보이지 않는 사람

by OKOK 2019. 2. 13.

1. 모음을 프린트 하지 않도록 처리

2. swith 문 사용함

3. 끝 


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
 
int main(void)
{
    freopen("input.txt""r", stdin);
    int T, test_case;
    char input[20];
    scanf("%d"&T);
    for (test_case = 1; test_case <= T; test_case++)
    {
        int i;
        scanf("%s", input);
        for(i=0; input[i]!='\0'; i++)
            switch (input[i]) {
            case 'a':
            case 'e':
            case 'i':
            case 'o':
            case 'u':
                break;
            default:
                printf("%c", input[i]);
            }
        printf("\n");
    }
    return 0;
}
cs

 


'Computer Science' 카테고리의 다른 글

정식이의 은행업무  (0) 2019.02.18
pacman basic  (0) 2019.02.18
세상의 모든 팰린드롬  (0) 2019.02.13
세상의 모든 팰린드롬 2  (0) 2019.02.13
초콜릿과 건포도  (0) 2019.02.12

댓글