席順・席次のビジネスマナー問題セット【長方形4席入口垂直・長方形6席入口平行・複数人掛けと一人掛け・議長席・富士山・コの字・タクシー・社用車・電車・エレベーター・和室・円卓】
【長方形4席入口垂直】コード
reader.on('close', () => {
const Table = new Array(2).fill().map(e => []);
for (let i = 0; i < 4; i++) {
Table[i % 2].unshift(lines[i]);
}
for (const member of Table) {
console.log(member.join(' '));
}
});
up。
【長方形6席入口平行】コード
reader.on('close', () => {
const Table = new Array(2).fill().map(e => []);
for (let i = 0; i < 6; i++) {
const member = lines[i];
if (i < 3) {
Table[0].unshift(member);
} else {
Table[1].unshift(member);
}
}
for (const member of Table) {
console.log(member.join(' '));
}
});
up。
【複数人掛けと一人掛け】コード
reader.on('close', () => {
const Table = new Array(3).fill().map(e => []);
for (let i = 0; i < 5; i++) {
const member = lines[i];
if (i < 3) {
Table[i][0] = member;
} else {
Table[i - 3][1] = member;
}
}
for (const member of Table) {
console.log(member.join(' '));
}
});
up。
【議長席】コード
reader.on('close', () => {
const Table = new Array(4).fill().map(e => []);
for (let i = 0; i < 7; i++) {
const member = lines[i];
if (i === 0) {
Table[i] = ['_ ' + member + ' _'];
} else if (i % 2 === 1) {
Table[(i + 1) / 2][1] = member;
} else if (i % 2 === 0) {
Table[i / 2][0] = member;
}
}
for (const member of Table) {
console.log(member.join(' _ '));
}
});
up。
【富士山】コード
reader.on('close', () => {
const Table = new Array(2).fill().map(e => []);
for (let i = 0; i < 4; i++) {
const member = lines[i];
if (i < 2) {
Table[i][1] = member;
} else {
Table[i - 2][0] = member;
}
}
for (const member of Table) {
console.log(member.join(' '));
}
});
up。
【コの字】コード
reader.on('close', () => {
const Table = new Array(5).fill().map(e => ['_', '_', '_', '_']);
for (let i = 0; i < 9; i++) {
const member = lines[i];
if (i === 0) {
Table[2][0] = member;
} else if (i === 1) {
Table[3][0] = member;
} else if (i === 2) {
Table[1][0] = member;
} else if (i % 2 === 1) {
Table[4][(i - 1) / 2] = member;
} else if (i % 2 === 0) {
Table[0][(i - 2) / 2] = member;
}
}
for (const member of Table) {
console.log(member.join(' '));
}
});
up。
【タクシー】コード
reader.on('close', () => {
const Table = new Array(2).fill().map(e => ['_', '_']);
for (let i = 0; i < 4; i++) {
const member = lines[i];
if (i === 3) {
Table[0][0] = member;
} else {
Table[1][2 - i] = member;
}
}
[Table[1][0], Table[1][1]] = [Table[1][1], Table[1][0]];
for (const member of Table) {
console.log(member.join(' '));
}
});
up。
【社用車】コード
reader.on('close', () => {
const Table = new Array(2).fill().map(e => ['_', '_']);
for (let i = 0; i < 4; i++) {
const member = lines[i];
if (i === 0) {
Table[0][0] = member;
} else {
Table[1][3 - i] = member;
}
}
[Table[1][0], Table[1][1]] = [Table[1][1], Table[1][0]];
for (const member of Table) {
console.log(member.join(' '));
}
});
up。
【電車】コード
reader.on('close', () => {
const Table = new Array(2).fill().map(e => []);
for (let i = 0; i < 6; i++) {
const member = lines[i];
if (i % 2 === 0) {
Table[1].unshift(member);
} else {
Table[0].unshift(member);
}
}
[Table[0][0], Table[0][1]] = [Table[0][1], Table[0][0]];
[Table[1][0], Table[1][1]] = [Table[1][1], Table[1][0]];
for (const member of Table) {
console.log(member.join(' '));
}
});
up。
【エレベーター】コード
reader.on('close', () => {
const Table = new Array(2).fill().map(e => []);
for (let i = 0; i < 5; i++) {
const member = lines[i];
if (i < 2) {
Table[0].push(member);
} else {
Table[1].push(member);
}
}
for (const member of Table) {
console.log(member.join(' '));
}
});
up。
【和室】コード
reader.on('close', () => {
const Table = new Array(2).fill().map(e => []);
for (let i = 0; i < 6; i++) {
const member = lines[i];
if (i < 3) {
Table[0].unshift(member);
} else {
Table[1].unshift(member);
}
}
[Table[0][1], Table[0][2]] = [Table[0][2], Table[0][1]];
[Table[1][1], Table[1][2]] = [Table[1][2], Table[1][1]];
for (const member of Table) {
console.log(member.join(' '));
}
});
up。
【円卓】コード
reader.on('close', () => {
const Table = new Array(3).fill().map(e => []);
for (let i = 0; i < 8; i++) {
const member = lines[i];
if (i < 3) {
Table[0].unshift(member);
} else if (i === 3) {
Table[1].unshift('_', member);
} else if (i === 4) {
Table[1].unshift(member);
} else {
Table[2].unshift(member);
}
}
[Table[0][1], Table[0][2]] = [Table[0][2], Table[0][1]];
[Table[2][0], Table[2][1]] = [Table[2][1], Table[2][0]];
for (const member of Table) {
console.log(member.join(' '));
}
});
up。
コメント