天天看點

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用的那麼溜,看起來高大上,是以自己研究了一下,也開啟了裝逼模式

繼續閱讀