You are viewing a single comment's thread. Return to all 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
Seems like cookies are disabled on this browser, please enable them to open this website
Designer Door Mat
You are viewing a single comment's thread. Return to all 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