새소식

Algorithm/Acmicpc.net (백준)

[C언어] 백준 : 입실관리 (5524번)

  • -
#include <stdio.h>
int main()
{
    int n;
    int j = 0;
    char s[20];
    scanf("%d\n", &n);
    for (int i = 0; i < n; i++) {
        j = 0;
        scanf(" %s", s);
        while (s[j] != '\0') {
            if (s[j] < 91) {
                s[j] += 32;
            }
            printf("%c", s[j]);
            j++;
        }
        printf("\n");
    }
    return 0;
}
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.