#include <stdio.h>

void clf()
{
    while(getchar()!='\n');
}

int main() {
    char p[7];
    char n[10];

    fputs("주민번호 앞 6자리: ", stdout);
    fgets(p, sizeof(p), stdin);
    clf();

    fputs("이름: ", stdout);
    fgets(n, sizeof(n), stdin);

    printf("주민번호: %s\n", p);
    printf("이름: %s\n", n);
    
    return 0;
}

Embed on website

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