September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,13 +1,13 @@
|
|||
var max = 12;
|
||||
var width = (max**2 -> len+1);
|
||||
|
||||
var max = 12
|
||||
var width = (max**2 -> len+1)
|
||||
|
||||
func fmt_row(*items) {
|
||||
items.map { |s| "%*s" % (width, s) }.join('');
|
||||
items.map {|s| "%*s" % (width, s) }.join
|
||||
}
|
||||
|
||||
say fmt_row('x┃', (1..max)...)
|
||||
say "#{'━' * (width - 1)}╋#{'━' * (max * width)}"
|
||||
|
||||
say fmt_row('x┃', (1..max)...);
|
||||
say "#{'━' * (width - 1)}╋#{'━' * (max * width)}";
|
||||
|
||||
max.times { |i|
|
||||
say fmt_row("#{i}┃", (1..max).map {|j| i <= j ? i*j : ''}...);
|
||||
};
|
||||
{ |i|
|
||||
say fmt_row("#{i}┃", {|j| i <= j ? i*j : ''}.map(1..max)...)
|
||||
} << 1..max
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue