diff options
Diffstat (limited to '2ndary/12/TP-ThanhHoá-2009/BAI4.PAS')
-rw-r--r-- | 2ndary/12/TP-ThanhHoá-2009/BAI4.PAS | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/2ndary/12/TP-ThanhHoá-2009/BAI4.PAS b/2ndary/12/TP-ThanhHoá-2009/BAI4.PAS new file mode 100644 index 0000000..8706032 --- /dev/null +++ b/2ndary/12/TP-ThanhHoá-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. |