Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from k:=1
- until k>i
- loop
- from j:=1
- until j>i
- loop
- print (arr.item (k, j)) print (" ")
- j:=j+1
- end
- k:=k+1
- print("%N")
- end
- from k:=i
- until k<1
- loop
- from j:=k
- until j<i-k+2
- loop
- if (arr.item(i-j+1, k)/~'#') then
- str1.append_character(arr.item (i-j+1, k))
- end
- j:=j-1
- end
- from j:=k
- until j<i-k+2
- loop
- if (arr.item(k, j)/~'#') then
- str1.append_character(arr.item (k, j))
- end
- j:=j-1
- end
- from j:=k
- until j<i-k+2
- loop
- if (arr.item(j , i-k+1)/~'#') then
- str1.append_character(arr.item (j, i-k+1))
- end
- j:=j-1
- end
- from j:=k
- until j<i-k+2
- loop
- if (arr.item(i-k+1, i-j+1)/~'#') then
- str1.append_character(arr.item (i-k+1, i-j+1))
- end
- j:=j-1
- end
- k:=k-1
- end
- str1.append_character (arr.item (i//2+1, i//2+1))
- Result := str1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement