#include <stdio.h>
struct syain {
char name[20];/* 氏名 */
char post[20];/* 所属 */
int syainID;/* 社員番号 */
};
int main()
{
struct syain data[20];/* 社員データ格納エリア */
int i;/* forループ用変数 */
int count = 0;/* 入力したデータ件数 */
for ( i = 0; i < 20; ++i) {
if (scanf("%s", data
[i
].
name) != 1)/* Ctrl+Dが押されたらbreakでループを抜ける */ break;
scanf("%s", data
[i
].
post); scanf("%d", &data
[i
].
syainID); count = count + 1;
}
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+CgpzdHJ1Y3Qgc3lhaW4gewogIGNoYXIgbmFtZVsyMF07Lyog5rCP5ZCNICovCiAgY2hhciBwb3N0WzIwXTsvKiDmiYDlsZ4gKi8KICBpbnQgc3lhaW5JRDsvKiDnpL7lk6Hnlarlj7cgKi8KfTsKCmludCBtYWluKCkKewogIHN0cnVjdCBzeWFpbiBkYXRhWzIwXTsvKiDnpL7lk6Hjg4fjg7zjgr/moLzntI3jgqjjg6rjgqIgKi8KICBpbnQgaTsvKiBmb3Ljg6vjg7zjg5fnlKjlpInmlbAgKi8KICBpbnQgY291bnQgPSAwOy8qIOWFpeWKm+OBl+OBn+ODh+ODvOOCv+S7tuaVsCAqLwoKICBmb3IgKCBpID0gMDsgaSA8IDIwOyArK2kpIHsKICAgIHByaW50ZigiaW5wdXQgbmFtZS4uLiIpOwogICAgaWYgKHNjYW5mKCIlcyIsIGRhdGFbaV0ubmFtZSkgIT0gMSkvKiBDdHJsK0TjgYzmirzjgZXjgozjgZ/jgolicmVha+OBp+ODq+ODvOODl+OCkuaKnOOBkeOCiyAqLwogICAgICBicmVhazsKICAgIHByaW50ZigiaW5wdXQgcG9zdC4uLiIpOwogICAgc2NhbmYoIiVzIiwgZGF0YVtpXS5wb3N0KTsKICAgIHByaW50Zigia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