#include <stdio.h>
#define MAX (20)
struct syain {
char name[MAX];/* 氏名 */
char post[MAX];/* 所属 */
int syainID;/* 社員番号 */
};
int main()
{
struct syain data[MAX];/* 社員データ格納エリア */
int count = 0;/* 入力したデータ件数 */
int i;
while (scanf("%s", data
[count
].
name) != EOF
) { /* Ctrl+Zが押されたらループを抜ける */
scanf("%s", data
[count
].
post); scanf("%d", &data
[count
].
syainID); count++;
if (count>MAX) break;
}
for ( i = 0; i < count; ++i) {
printf("*******[ IDnumber %d ]*******\n", data
[i
].
syainID); printf(" post:%s\n", data
[i
].
post); printf(" name:%s\n", data
[i
].
name); printf("*****************************\n"); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgTUFYICgyMCkKCnN0cnVjdCBzeWFpbiB7CiAgY2hhciBuYW1lW01BWF07Lyog5rCP5ZCNICovCiAgY2hhciBwb3N0W01BWF07Lyog5omA5bGeICovCiAgaW50IHN5YWluSUQ7Lyog56S+5ZOh55Wq5Y+3ICovCn07CgppbnQgbWFpbigpCnsKICBzdHJ1Y3Qgc3lhaW4gZGF0YVtNQVhdOy8qIOekvuWToeODh+ODvOOCv+agvOe0jeOCqOODquOCoiAqLwogIGludCBjb3VudCA9IDA7Lyog5YWl5Yqb44GX44Gf44OH44O844K/5Lu25pWwICovCiAgaW50IGk7CiAgCiAgcHJpbnRmKCJpbnB1dCBuYW1lLi4uIik7CiAgd2hpbGUgKHNjYW5mKCIlcyIsIGRhdGFbY291bnRdLm5hbWUpICE9IEVPRikgewogICAgLyogQ3RybCta44GM5oq844GV44KM44Gf44KJ44Or44O844OX44KS5oqc44GR44KLICovCiAgICBwcmludGYoImlucHV0IHBvc3QuLi4iKTsKICAgIHNjYW5mKCIlcyIsIGRhdGFbY291bnRdLnBvc3QpOwogICAgcHJpbnRmKCJpbnB1dCBzeWFpbklELi4uIik7CiAgICBzY2FuZigiJWQiLCAmZGF0YVtjb3VudF0uc3lhaW5JRCk7CiAgICBjb3VudCsrOwogICAgcHJpbnRmKCJcbiIpOy8qIOaUueihjCAqLwogICAgaWYgKGNvdW50Pk1BWCkgYnJlYWs7CiAgICAKICAgIHByaW50ZigiaW5wdXQgbmFtZS4uLiIpOwogIH0KCiAgcHJpbnRmKCJcbiIpOwogIHByaW50ZigiXG4iKTsKICBmb3IgKCBpID0gMDsgaSA8IGNvdW50OyArK2kpIHsKICAgIHByaW50ZigiXG4iKTsKICAgIHByaW50ZigiKioqKioqKlsgSURudW1iZXIgJWQgXSoqKioqKipcbiIsIGRhdGFbaV0uc3lhaW5JRCk7CiAgICBwcmludGYoIiBwb3N0OiVzXG4iLCBkYXRhW2ldLnBvc3QpOwogICAgcHJpbnRmKCIgbmFtZTolc1xuIiwgZGF0YVtpXS5uYW1lKTsKICAgIHByaW50ZigiKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcbiIpOwogIH0KCiAgcmV0dXJuIDA7Cn0K