天天看点

Complete The Pattern #2

you have to write a function pattern which creates the following pattern upto n number of rows. if the argument is 0 or a negative integer then it should return "" i.e. empty string.

pattern(4):

pattern(6):

<code>note: there are no blank spaces</code>

<code>hint: use \n in string to jump to next line</code>

之前做的几个练习题,看别人用linq用的那么溜,看起来高大上,所以自己研究了一下,也开启了装逼模式

继续阅读