给定臂的大小作为输入,编写一个绘制ASCII星号的程序或函数。
这是一颗大小的星星 1
_/\_
\ /
|/\|
这是一颗大小的星星 2
/\
__/ \__
\ /
\ /
| /\ |
|/ \|
这是一颗大小的星星 3
/\
/ \
___/ \___
\ /
\ /
\ /
| /\ |
| / \ |
|/ \|
等等。
输入值
任何方便格式的一个正整数,n > 0
。
输出量
遵循上述规则,以ASCII艺术形式表示星星。前导/尾随换行符或其他空格是可选的,但前提是要正确对齐这些点。
规则
6
只是我的屏幕,还是星星看起来异常高大而稀疏?
—
caird coinheringaahing
愚蠢的ASCII码及其缺乏浅
—
斜率的信息
@cairdcoinheringaahing SE使用的字体不是方形的-行之间有很大的空白,这会增加失真。
—
AdmBorkBork