Designer Door Mat

  • + 0 comments

    it calculated the times of pattern .|. to be printed, according to index number of line:

    lets take n = 7, so n//2 = 3

    range 3 will be 0,1,2

    for index 0,1,2 you should print .|. 1,3,5 times accordingly

    hence 2*i+1