var a: array [1..7] of System.Tuple<Boolean, String>; i: byte;
begin a[1] := new System.Tuple<boolean,string>(true, 'Понедельник'); a[2] := new System.Tuple<boolean,string>(true, 'Вторник'); a[3] := new System.Tuple<boolean,string>(true, 'Среда'); a[4] := new System.Tuple<boolean,string>(true, 'Четверг'); a[5] := new System.Tuple<boolean,string>(true, 'Пятница'); a[6] := new System.Tuple<boolean,string>(false, 'Суббота'); a[7] := new System.Tuple<boolean,string>(false, 'Воскресение'); readln(i); writeln((i in [1..7] ? String.Format('Day #{0} is {1}. It is {2}.', i, a[i].Item2, (a[i].Item1 ? 'working day' : 'weekend')) : 'There aren`t this day.')); end.
a: array [1..7] of System.Tuple<Boolean, String>;
i: byte;
begin
a[1] := new System.Tuple<boolean,string>(true, 'Понедельник');
a[2] := new System.Tuple<boolean,string>(true, 'Вторник');
a[3] := new System.Tuple<boolean,string>(true, 'Среда');
a[4] := new System.Tuple<boolean,string>(true, 'Четверг');
a[5] := new System.Tuple<boolean,string>(true, 'Пятница');
a[6] := new System.Tuple<boolean,string>(false, 'Суббота');
a[7] := new System.Tuple<boolean,string>(false, 'Воскресение');
readln(i);
writeln((i in [1..7] ? String.Format('Day #{0} is {1}. It is {2}.', i, a[i].Item2,
(a[i].Item1 ? 'working day' : 'weekend')) : 'There aren`t this day.'));
end.
begin
readln(month);
if ((month >0 ) and ( month < 13)) then
case month of
1 : writeln ('january (31 days) ');
2 : writeln ('fabruary (28 days) ');
3 : writeln ('march (31 days)');
4 : writeln ('April (31 days) ');
5 : writeln ('fabruary (28 days)');
6 : writeln ('march (31 days)');
7 : writeln ('january (31 days) ');
8 : writeln ('fabruary (28 days) ');
9 : writeln ('march (31 days)');
10 : writeln ('january (31 days) ');
11 : writeln ('fabruary (28 days) ');
12: writeln ('march (31 days)');
end
else writeln('error');
readln;
end.