We given a task to create a swift function to generate and return an array of an odd number for a given number of element.
If element is generate(7) then output will be [