#include <stdio.h>
int main(void) {
// your code goes here
FILE *fp;
char yomi[20];
char kanji[20];
fp
= fopen("data.txt", "r"); if(fp == NULL) {
return -1;
}
while(fscanf(fp
, "%s%s", kanji
, yomi
) != EOF
) { printf("%s %s\n", yomi
, kanji
); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglGSUxFICpmcDsKCWNoYXIgeW9taVsyMF07CgljaGFyIGthbmppWzIwXTsKCglmcCA9IGZvcGVuKCJkYXRhLnR4dCIsICJyIik7CglpZihmcCA9PSBOVUxMKSB7CgkJcHJpbnRmKCJlcnJvciIpOwoJCXJldHVybiAtMTsKCX0KCQoJd2hpbGUoZnNjYW5mKGZwLCAiJXMlcyIsIGthbmppLCB5b21pKSAhPSBFT0YpIHsKCQlwcmludGYoIiVzICVzXG4iLCB5b21pLCBrYW5qaSk7Cgl9CgoJZmNsb3NlKGZwKTsKCXJldHVybiAwOwp9