Lua program
Given a numberĀ NN, generate a star pattern such that on the first line there areĀ NNstars and on the subsequent lines the number of stars decreases by 1. The pattern generated should haveĀ NNĀ rows. In every row, every fifth star (*) is replaced with a hash (#). Every row should have the required number of stars (*) and hash (#) symbols. The code stub providedĀ hereĀ is to be used. It calls the functionĀ generatePattern(). Your task is to complete the function. Input: First line will containĀ TT, number of testcases. Then the testcases follow. Each testcase contains a single integerĀ NN Output: For each testcase, print the star and hash pattern. Constraints 1ā¤Tā¤251ā¤Tā¤25 1ā¤Nā¤1001ā¤Nā¤100 Subtasks Subtask #1 (40 points):Ā Nā¤15Nā¤15 Subtask #2 (60 points):Ā original constraints