From 2f674dc80f0382f1c3178f435714960734dc9d3c Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Sat, 6 Jun 2020 21:33:13 +0700 Subject: Reorganize stuff from secondary school --- "2ndary/12/TP-ThanhHo\303\241-2009/BAI4.PAS" | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 "2ndary/12/TP-ThanhHo\303\241-2009/BAI4.PAS" (limited to '2ndary/12/TP-ThanhHoá-2009/BAI4.PAS') diff --git "a/2ndary/12/TP-ThanhHo\303\241-2009/BAI4.PAS" "b/2ndary/12/TP-ThanhHo\303\241-2009/BAI4.PAS" new file mode 100644 index 0000000..8706032 --- /dev/null +++ "b/2ndary/12/TP-ThanhHo\303\241-2009/BAI4.PAS" @@ -0,0 +1,29 @@ +const + m: array[1..9] of byte = (0, 0, 1, 1, 0, 0, 4, 7, 0); + equa: array[1..9] of ansistring = ( + #10, + #10, + #10'1+2-3=0'#10, + #10'1-2-3+4=0'#10, + #10, + #10, + #10'1+2-3+4-5-6+7=0'#10'1+2-3-4+5+6-7=0'#10'1-2+3+4-5+6-7=0'#10'1-2-3-4-5+6+7=0'#10, + #10'1+2+3+4-5-6-7+8=0'#10'1+2+3-4+5-6+7-8=0'#10'1+2-3+4+5+6-7-8=0'#10'1+2-3-4-5-6+7+8=0'#10'1-2+3-4-5+6-7+8=0'#10'1-2-3+4+5-6-7+8=0'#10'1-2-3+4-5+6+7-8=0'#10, + #10 + ); + +var + n: byte; + f: text; + +begin + assign(f, 'BAI4.INP'); + reset(f); + read(f, n); + close(f); + + assign(f, 'BAI4.OUT'); + rewrite(f); + write(f, m[n], equa[n]); + close(f) +end. -- cgit 1.4.1